-
Notifications
You must be signed in to change notification settings - Fork 5
@cache: opt-in X-Cache: HIT/MISS debug header #335
Copy link
Copy link
Open
Labels
developer-experienceSurprising behaviour, missing warnings or unclear errors for library usersSurprising behaviour, missing warnings or unclear errors for library usersenhancementNew feature or requestNew feature or requesthttp-cacheThe @cache decorator, cache keys and Cache-Control handlingThe @cache decorator, cache keys and Cache-Control handling
Description
Activity
Metadata
Metadata
Assignees
Labels
developer-experienceSurprising behaviour, missing warnings or unclear errors for library usersSurprising behaviour, missing warnings or unclear errors for library usersenhancementNew feature or requestNew feature or requesthttp-cacheThe @cache decorator, cache keys and Cache-Control handlingThe @cache decorator, cache keys and Cache-Control handling
Problem
A new user cannot tell a hit from a miss without adding counters to their handlers. The only signal is
DEBUGlogging.Proposal
Add an opt-in debug header (e.g.
@cache(..., debug_header=True)or a global setting) that sendsX-Cache: HIT | MISS | BYPASS | STALE. Keep it off by default, since it reveals caching behaviour to clients.