Skip to main content

Caching of objects in the public backend

Last update:

When a user first requests an object in a public backend, the object is stored in the S3 cache. If the object is cached, the user will immediately get it from the storage cache server, not from its backend server, when requesting it again.

The cache is cleared automatically when the object body changes, the caching system tracks changes by MD5 hash.

You can change the caching settings for the bucket via the Cache-Control header.

To get the current version of an object, you can clear the cache manually — this will update the content on the cache server.

Clear cache

  1. In the control panel, on the top menu, click Products and select S3.
  2. Go to Clear Cache.
  3. Insert references to each object whose cache needs to be cleared.
  4. Click Clear cache.

Configure caching

  1. In the control panel, on the top menu, click Products and select S3.
  2. Go to the Buckets section.
  3. Open the baket page → Configuration tab.
  4. In the Cache-Control field, enter the caching settings separated by commas — for example, public, no-cache, private, max-age=31536000, where 31536000 is the maximum cache retention time in seconds.
  5. Click Save.