Caching
Caching
The first time a user requests an object in a public container, the object is stored in the object store's cache. If the object is cached, when the user makes a second request, the object will be retrieved immediately from the object store's cache server, not from its backend server.
The cache is cleared automatically when the object body changes, the caching system tracks changes by MD5 hash.
You can change caching settings for the container through the header Cache-Control
.
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
- В control panels go to Object Storage → Clearing the cache.
- Insert references to each object whose cache needs to be cleared.
- Click Clear cache.
Configure caching
- В control panels go to Object Storage → Containers.
- Open the container page → tab Configuration.
- In the field Cache-Control enter the caching settings separated by commas — for example,
public, no-cache, private, max-age=31536000
where31536000
— maximum cache retention time in seconds. - Click Save.