Overview
Sources
Libraries
Images API

Source Cache Settings

Source cache settings are a set of attributes that define how long request responses are stored in the cache.

Cache Max-Age

This attribute determines the number of seconds that responses for the source will be stored in the cache.

The default and recommended value for this attribute is 31.536.000 seconds (1 year). This means that the response will be stored in our CDN and user's browsers by default for 1 year.

With the default value the following header will be included in the response:

Cache-Control: max-age=31536000, public

It is possible to define a different value for this attribute specifying any number of seconds in the range of 3.600 (1 hour) to 31.536.000 (1 year).

Error Cache Max-Age

Error cache max-age defines the number of seconds that error responses for the source will be stored in the cache (e.g 4XX or 5XX HTTP errors).

Errors can happen momentarily so the default value for error cache max-age is shorter. The recommended and default value for this attribute is 360 seconds (6 minutes).

Using the default value the following header will be included in the response when a request error is returned:

Cache-Control: max-age=360, public

It is possible to define a different value for this attribute specifying any number of seconds in the range of 1 to 31.536.000 (1 year).