How to enable or disable nginx cache
Dec 25, 2020 am 10:42 AMSometimes when we are debugging the website program, we will encounter the problem that the code modification is invalid due to the browser's cache. At this time, we must force refresh to clear the cache, which is very of inconvenience.
(Learning video sharing: Programming video)
If we disable nginx cache, let the browser go to the server to request the file every time instead of reading it in the browser It will be much more convenient to retrieve the cached files.
After the program is debugged and goes online, you can turn on nginx cache to save the server's bandwidth traffic, reduce some requests, and reduce the pressure on the server.
Achieve the switch effect by configuring the nginx configuration file /usr/local/nginx/conf/nginx.conf
1. Enable cache
1 2 3 4 |
|
2. Disable Cache
1 2 3 4 |
|
Related recommendations:nginx tutorial
The above is the detailed content of How to enable or disable nginx cache. For more information, please follow other related articles on the PHP Chinese website!

Hot tools Tags

Hot Article

Hot tools Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

How to allow external network access to tomcat server

What are the nginx start and stop commands?

How to solve the problem of nginx when accessing the website

How to deploy nodejs project to server

How to communicate between docker containers
