Blog

Configure Caching Easily with S-Maxage - Now in GA

October 23, 2020 · by Abhilash Puttaiah ·
Categories:

S-Maxage is now in GA for Dynamic Site Accelerator and Ion! We’ve listened to our users and have created an easier way to manage your cache settings. 

What is S-Maxage?

With the trend shifting to multi-CDN solutions, teams need easier ways to manage their settings across the various platforms they use. 

S-Maxage is a cache-control directive outlined by the Internet Engineering Task Force’s (IETF) that makes it much easier to configure caching across shared caches - in a single setting.  For teams that use multiple CDNs, this new capability significantly simplifies cache management. 

Now, once you enable S-Maxage, you can decide how long content will be cached starting from the time content is requested by a CDN by configuring Time To Live (TTL) just once for all of your CDNs and intermediary caches. 

What are the Benefits?

  • Configure your cache settings for all of your CDNs at once

  • Override pre-existing max-age and Expires settings when present in a shared cache

  • Maintain excellent performance since your browser ignores S-Maxage

With S-Maxage enabled, you can easily standardize your caching TTL across various CDNs in a single setting. This will reduce the configuration overhead for caching and reduce unnecessary complexity.

With Honor Cache-Control support, If a response includes an S-Maxage directive in the Cache-Control response header for a shared cache, the maximum age specified by this directive overrides the maximum age specified by either the max-age directive or the Expires header.

Note: The new caching behavior has both the old and new Cache-control options providing scope to switch back. Existing customers who would like to retain their current functionality can choose to opt-in.

Enable S-Maxage Support

Enabling S-Maxage is a simple 3 step process:

  1. Go to your Property Manager page in the Control Center and create a new configuration or a new version of your existing configuration

  2. Select ‘Honor Origin Cache-Control’ or ‘Honor Origin Cache-Control and Expires’ from the "Caching option" dropdown. 

  3. Turn on the “Enhanced RFC Support” toggle.

  4. Turn on the “Honor s-maxage” toggle. 

    settings

     

  5. Save and activate the property version.

  6. Once activated, Akamai will start honoring the “S-Maxage” directive in the Cache-Control header sent by the origin.

Note:   These options will be the same for creating a new Property Manager configuration and creating a new version from an existing Property Manager configuration.

What happens to the Edge Control header? 

Edge-Control header is an Akamai specific header used to override all other cache settings, including the S-Maxage directive, and can be sent from the Origin Server. 

We honor the S-Maxage directive only when Akamai caching is set to ‘Honor Origin Cache-Control’ or ‘Honor Origin Cache-Control and Expires.’ The 'Edge-Control' header overrides the TTL in the config irrespective of what caching setting we have in the configuration. 

Below, you can see an example of how these caching settings work:

Request to Origin:

chaching

Request via Akamai:

chaching

FAQ

  1. Will you honor the Edge Control header over S-Maxage?
    Yes, We continue to honor the Edge Control header over the S-Maxage directive to override TTL settings in the configuration. 

  2. What is the order of precedence?
    The order is: Edge-Control followed by Cache-Control and Expires.

  3. How do I enable S-Maxage if I have an Edge Cache setting?
    If the customer has a multi CDN approach and chose to consider S-Maxage for the caching needs to keep it consistent across CDN’s, they only need to enable S-Maxage in the caching behavior and must remove the Edge Cache setting.

  4. How are cache settings defined if S-Maxage is not enabled?
    If there is no S-Maxage directive in the Cache-Control header, we consider the value of the max-age to be the TTL for the object.  

You Might Also Like

If you’re not an Ion or Dynamic Site Accelerator customer, you can try S-Maxage out by signing up for a free trial: 

You can also check out Property Manager Help for Caching Behavior and S-Maxage and other caching directives to learn more.