First of all, question 1: nginx cache expiration time I set 300 seconds in conf to expire, but after I updated the blog log page 300 seconds, the page is not updated, as shown in: my friends are stunned! Implement the levi. cg. amarchives3066 text editor with 10 lines of JavaScript...
First, question 1: nginx cache expiration time
I set 300 seconds to expire in conf, but after I updated the blog log page 300 seconds, the page is refreshed and not updated.
For example:
My friends are stunned! Text Editor with 10 lines of JavaScript
Http://levi.cg.am/archives/3066
Why?
Question 2: How to clear the cache
I found that nginx stores the cache in the specified directory and sets the directory with the last four digits of the cached file name. For example:
I think the cache name should be MD5. If the cached file is deleted, the cache of the specified page will be deleted successfully.
But this MD5 does not seem to be determined based on the URL, or the above link, input in PHP:
echo md5('http://levi.cg.am/archives/3066');// output 4099cbf6f33f521b84cdb94d707f5758
It seems that there is no 4099cbf6f33f521b84cdb94d707f5758 file.
I read the fastcgi cache key set in conf.
fastcgi_cache_key $request_method://$host$request_uri;
It should be a domain name. Is it true that the md5 in nginx is inconsistent with that in php? How can I know the cached files on the specified page?
Reply content:
First, question 1: nginx cache expiration time
I set 300 seconds to expire in conf, but after I updated the blog log page 300 seconds, the page is refreshed and not updated.
For example:
My friends are stunned! Text Editor with 10 lines of JavaScript
Http://levi.cg.am/archives/3066
Why?
Question 2: How to clear the cache
I found that nginx stores the cache in the specified directory and sets the directory with the last four digits of the cached file name. For example:
I think the cache name should be MD5. If the cached file is deleted, the cache of the specified page will be deleted successfully.
But this MD5 does not seem to be determined based on the URL, or the above link, input in PHP:
echo md5('http://levi.cg.am/archives/3066');// output 4099cbf6f33f521b84cdb94d707f5758
It seems that there is no 4099cbf6f33f521b84cdb94d707f5758 file.
I read the fastcgi cache key set in conf.
fastcgi_cache_key $request_method://$host$request_uri;
It should be a domain name. Is it true that the md5 in nginx is inconsistent with that in php? How can I know the cached files on the specified page?