Caching in NGINX is the process of storing data in front of web servers. For example, the files a user automatically requests by looking at a web-page can be stored in your NGINX cache directory. When a user returns to a page he’s recently looked at, the browser can get those files from the NGINX cache directory rather than the original server, saving time and traffic.
So caching improves performance while accessing to a resource in two ways:
This instruction shows how to set up a caсhe on the NGINX-balancer in the CirrusGrid PaaS.
With NGINX-balancer you can use caching for reducing application servers load. To perform that just come through the next steps:
1. Log into the CirrusGrid dashboard.
2. Ask CirrusGrid to Create Environment.
3. Create the environment with a few application servers and NGINX as a balancer, specify the cloudlet limits, type the name of the environment and click Create button.
In a minute your environment will be created and appears in the environment list.
4. For setting up the cache click Config button for NGINX node in your environment and navigate to conf.d > cache.conf.
5. For enabling cache uncomment lines as it is shown in the picture below.
To find info about other available directives follow the link.
Tip: If it is necessary to clear the cache you can just use proxy_cache_valid directory with the 0m parameter value.
6. Save the changes and restart the node.
Powered by BetterDocs
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.