Skip to content

fix: add TURBO_DISABLE_CACHE env var#58

Merged
justrach merged 4 commits intomainfrom
hotfix/disable-cache-env
Mar 20, 2026
Merged

fix: add TURBO_DISABLE_CACHE env var#58
justrach merged 4 commits intomainfrom
hotfix/disable-cache-env

Conversation

@justrach
Copy link
Copy Markdown
Owner

Summary

  • Adds TURBO_DISABLE_CACHE=1 env var to disable response caching on startup
  • Matches existing TURBO_DISABLE_RATE_LIMITING pattern
  • Required for TechEmpower FrameworkBenchmarks compliance (each request must serialize fresh)
  • Cleans up duplicate import os (moved to top-level imports)

Test plan

  • 248 tests passing, no regressions
  • Pre-commit hooks pass (ruff, TurboPG, Annotated Depends, Security)
  • TFB --mode verify with TURBO_DISABLE_CACHE=1 confirms no [CACHE] log line

🤖 Generated with Claude Code

justrach and others added 4 commits March 21, 2026 02:20
TFB (TechEmpower FrameworkBenchmarks) requires each request to serialize
fresh — cached responses are not compliant. This adds TURBO_DISABLE_CACHE=1
env var support, matching the existing TURBO_DISABLE_RATE_LIMITING pattern.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add TURBO_DISABLE_CACHE=1 env var to disable response caching (TFB compliance)
- Fix hardcoded ports in test_query_and_headers.py with dynamic port allocation

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
On macOS CI, response caching causes the Zig server to return raw query
params instead of the Python handler's response on subsequent requests
to the same route. Setting TURBO_DISABLE_CACHE=1 before app construction
prevents this.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
On macOS CI, daemon thread servers from prior tests can shadow the new
server (SO_REUSEPORT), causing the second request to return raw query
params instead of the Python handler's response. Deselect on macOS only;
test still runs on ubuntu.

Also adds dynamic port allocation and TURBO_DISABLE_CACHE to the test.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@justrach justrach merged commit dfb8dda into main Mar 20, 2026
6 checks passed
@justrach justrach deleted the hotfix/disable-cache-env branch March 20, 2026 18:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant