Split setup (newTestCacheDB, insertCachedResponse) and async polling (waitForFreshCache) out of the test to reduce its cyclomatic complexity below 10. Switch DB calls to ExecContext / QueryRowContext to fix noctx lint.