December 2018
Beginner to intermediate
404 pages
10h 14m
English
We can configure nginx to cache the static files served, and have the repeated requests to be served directly from the nginx cache, without the need to pass on a request to the upstream odoo server.
Activating static content caching allows for a faster response time and reduces the workload for Odoo servers.
To enable this setting, add the following code before the location /longpolling section:
# cache static data location ~* /web/static/ {
proxy_cache_valid 200 60m;
proxy_buffering on;
expires 864000;
proxy_pass http://odoo;
}
With this command, static data is now cached for 60 minutes. Further, additional requests in that interval will be responded to directly by nginx from the cache.
Read now
Unlock full access