How to Manage Cache TTL?

Picture of Written by BlazingCDN

Written by BlazingCDN

December 13, 2023

Effective cache management is pivotal to delivering a seamless user experience. In BlazingCDN, Time to Live (TTL) settings are crucial for controlling how long content is cached. This article provides a comprehensive understanding of TTL settings and how they can be optimized for your content delivery needs.

TTL Explained

TTL stands for “Time to Live”. It defines the duration for which the content is stored in a cache before it is refreshed from the origin server. In BlazingCDN, you can configure various TTL parameters to ensure your content remains fresh and load times remain quick.

1. Inactive TTL (Delete Time To Live).

This setting determines how long to keep files that have not been requested.

  • Default: 2 days
  • Maximum: 365 days
  • Usage: Set this for files that are infrequently accessed. A shorter Inactive TTL can save cache space and ensure stale content is removed promptly.

2. Active TTL (Update Time To Live).

This defines the window for the next cache refresh.

  • Default: 2 days
  • Maximum: 365 days
  • Usage: Use this to control the regular update frequency of your content. This is essential for frequently updated sites.

3. Browser Active TTL.

Similar to Active TTL, but for browser cache.

  • Default: 2 days
  • Maximum: 365 days
  • Usage: This setting influences the cache behavior of the client’s browser, ensuring that users’ browsers cache content for an optimal time.

4. Min Requests to Cache.

Specifies the minimum number of file requests before it gets cached.

  • Default: 1 request
  • Usage: Prevents seldom-accessed content from being cached unnecessarily.

5. Override by Response Header Params.

Allows cache behavior to be defined by server response headers.
Usage: Enable this to have granular control over caching via server-side configurations.

6. Cache Gzipped Content Separately.

Determines if gzipped content should be cached separately.
Usage: Turn this on if you serve gzipped content and want to optimize for performance with compatible clients.

7. Truncate URL Params.

Truncates parameters from URLs for specified file types, aiding in cache efficiency.

Affected Extensions: .jpg, .jpeg, .gif, .png, .tif, .bmp, .svg
Usage: Simplifies caching by ignoring URL parameters that don’t change content.