locize documentation
Help Center
Blog
Sign in
locize.com
Search…
Introduction
Using locize
What's inside?
The different views
Checks/Issues
Using locize as a translator
Integration
Getting started
Instrumenting your code
API
Webhook
CLI
I18n Formats
File Formats
Guides / Tips & Tricks
Find unused translations
How to search
Going to production
Keeping track of new translations
Working with translators
Migrating an i18next project
Migrating from ...
More
InContext Editor
Figma Plugin
Versioning
Namespaces
Caching
Alternative Caching with i18next
Backend Fallback
Latency Optimization – Tips for Optimal Performance
Notifications
2-factor authentication
Convince Your Boss Letter
General questions
Powered By
GitBook
Caching
If you're integrating locize outside of a browser application, you may checkout
alternative caching options
.
The Cache-Control max-age defines the amount of time a file should be cached for.
The max-age response directive indicates that the response is to be considered stale after its age is greater than the specified number of seconds.
The max-age is expressed in seconds.
Common max-age values are:
Disabled cache: max-age=0
Five seconds: max-age=5
One minute: max-age=60
One hour: max-age=3600
One day: max-age=86400
One week: max-age=604800
When using max-age to define your cache times one should consider how fast your users should be able to request the updated files.
For example for versions used by the development teams we recommend to disable the cache functionality.
For production versions we recommend a low cache value.
Remember: if you for example have a max-age of 604800 your users could have to wait up to one week before receiving the updated file.
On the default version "latest", caching is not possible.
Our advice
1.
Create a dedicated version for production
2.
Do not enable auto publish for that version and publish manually or via
API
or via
CLI
3.
Enable Cache-Control max-age
Why is there such a high download amount?
More - Previous
Namespaces
Next
Alternative Caching with i18next
Last modified
11mo ago
Copy link