generated from coulomb/repo-seed
feat(summary): revision-gated cache with stale-while-revalidate (STATE-WP-0066)
Replace the fixed 15s TTL on GET /state/summary with per-table revision watermarks, stale-while-revalidate background refresh, and a progress-tail section split. SQLAlchemy write hooks invalidate core or progress sections on mutation. Adds tests, benchmark script, and operator docs.
This commit is contained in:
@@ -52,10 +52,10 @@ def _truncate(_schema):
|
||||
from api.models import Base
|
||||
import api.routers.state as _state_router
|
||||
import api.routers.workstreams as _ws_router
|
||||
from api.services.summary_cache import reset_summary_cache_for_tests
|
||||
|
||||
# Reset in-process TTL caches so stale data from a previous test can't bleed through.
|
||||
_state_router._SUMMARY_CACHE = None
|
||||
_state_router._SUMMARY_CACHE_AT = 0.0
|
||||
# Reset in-process caches so stale data from a previous test can't bleed through.
|
||||
reset_summary_cache_for_tests()
|
||||
_state_router._OVERVIEW_CACHE = None
|
||||
_state_router._OVERVIEW_CACHE_AT = 0.0
|
||||
_ws_router._INDEX_CACHE = None
|
||||
|
||||
Reference in New Issue
Block a user