> For the complete documentation index, see [llms.txt](https://karansingh.gitbook.io/tutorialsdojo-wrong-answers/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://karansingh.gitbook.io/tutorialsdojo-wrong-answers/test-6-78/managing-how-long-content-stays-in-the-cache-expiration.md).

# Managing how long content stays in the cache (expiration)

* You can **control how long your files stay in a CloudFront cache before CloudFront forwards another request to your origin**.<br>
* Reducing the duration allows you to serve dynamic content.
* Increasing the duration means that your users get better performance because your files are more likely to be served directly from the edge cache.<br>
* The `Cache-Control max-age` directive lets you specify **how long (in seconds) that you want an object to remain in the cache before CloudFront gets the object again from the origin server**.<br>
* For example, the following directive **tells CloudFront to keep the associated object in the cache for 3600 seconds** (one hour): **`Cache-Control: max-age=3600`**
