You need to enable JavaScript to run this app.
Torch Object Storage

Torch Object Storage

Copy page
Download PDF
Basic configurations
Browser cache expiration
Copy page
Download PDF
Browser cache expiration
TOS allows you to set an expiration time for your browser cache. After this time has passed, your browser will refresh the cache. This topic explains how to do that.​
Background information​
The Cache-Control header contains directives for implementing caching mechanisms in HTTP requests and responses. Using the HTTP Cache-Control header, a server can specify the expiration time of cached files. A TOS server can use the Cache-Control: max-age=<specifed expiration time> header to manage the expiration time of browser-cached files.​
Notes​
  • Once the expiration time for the browser cache is specified, the cache setting only takes effect on objects that are newly uploaded to the bucket. Objects that are already in the bucket are not affected. Newly uploaded objects will automatically inherit the cache configuration of the bucket if the Cache-Control header is not specified.​
  • By default, the owner of an account has full permissions. Identity and Access Management (IAM) users have no permissions by default. If an IAM user needs to perform this operation, the account owner must grant the user the tos:PutBucketMaxAge, tos:GetBucketMaxAge, and tos:DeleteBucketMaxAge permissions using an IAM or bucket policy.​
Steps​
  1. Log in to the TOS console.​
  1. In the left navigation pane, click Buckets.​
  1. In the top menu bar, select the project of the bucket you want to manage.​
  1. On the Buckets page, click the name of the bucket.​
  1. In the left navigation pane, select Permissions > Browser cache valid period.​
  1. On the Browser cache valid period page, click Edit, toggle the Browser cache valid period switch on, and specify the cache time.​
  • ​
    Parameter​
    Description​
    Cache time​
    Specify how long files are kept in a browser's cache, in seconds.​
    Enter a positive integer between 1 and 31,536,000.​
    Once a cache time has been specified for the bucket, any objects uploaded to it without a Cache-Control header will automatically have a Cache-Control: max-age=<specified expiration time> header added.​
    ​
  1. Click Select to save your settings.​
Last updated: 2026.07.24 11:20:32