Accepting selected projects for Q2 2024 Check availability
SERVER 02SYSTEM ONLINELAST SYNC: 03:17:44RSS_FEED.XML — PARSE WARNING
HALF ASSEDTECHNICAL NOTES_
EST. 2009ISSUE 04.2BEST VIEWED AT 1024 × 768
TECHNICAL NOTES / TECHNICAL NOTES / PLATFORM / RECORD a1d87c
[PLATFORM]NOTE

Caching authenticated content at the edge

POSTED: 26.01.2022AUTHOR: ADMIN6 MIN READCOMMENTS: 0

Edge caching can reduce origin load, but an incomplete variation key can expose one user’s response to another more quickly than the application could do alone.

Classify responses first

Separate public, privately personalised and sensitive responses by route and state. Default authenticated responses to private or no-store until a documented design proves which content is safe to share.

Control the cache key

Vary only on normalised values that change the representation. Cookies, authorisation headers, language and device rules require explicit treatment; unbounded variation can destroy efficiency while omitted state can disclose data.

Test isolation and invalidation

Use two accounts with recognisably different data and repeat requests through each edge location. Verify logout, permission changes, purge propagation, stale-on-error behaviour and responses produced when the origin is unavailable.

SAFE DEFAULT

If the team cannot state why two users are entitled to the same cached object, the object is not a public edge-cache candidate.