Ravi Sir's Cards › AWS
Cache behaviors and TTL
This revision card explains Cache behaviors and TTL. It starts from the need that wrong TTL serves stale prices or never caches and burns origin. It describes behaviors match path patterns; TTL and cache policies control what is stored at the edge. The how-to section notes static /assets/* long TTL; /api/* caching disabled or short; use versioned filenames for deploys. An example on the card is app.js?v=42 caches a year; HTML stays short so new deploys appear quickly.
Read card text
What this card says
Why do we need it?
Wrong TTL serves stale prices or never caches and burns origin.
What is it?
Behaviors match path patterns; TTL and cache policies control what is stored at the edge.
cache policy
How to do it
Static /assets/* long TTL; /api/* caching disabled or short; use versioned filenames for deploys.
Example
app.js?v=42 caches a year; HTML stays short so new deploys appear quickly.