Home > Backend Development > PHP Tutorial > 请教如何获取fastcgi缓存的key

请教如何获取fastcgi缓存的key

WBOY
Release: 2016-06-06 20:45:09
Original
1070 people have browsed it

nginx.conf中设置的fastcgi缓存的key如下

<code>fastcgi_cache_key $request_method://$host$request_uri;
</code>
Copy after login
Copy after login

举例,有这么一个URL

http://levi.cg.am/archives/3066

请问如何用PHP得到缓存的文件名称

备注:

  1. 这么做的目的是要清除某一个页面的nginx缓存
  2. 我试过这么写,但是不对

    md5('http://levi.cg.am/archives/3066');

回复内容:

nginx.conf中设置的fastcgi缓存的key如下

<code>fastcgi_cache_key $request_method://$host$request_uri;
</code>
Copy after login
Copy after login

举例,有这么一个URL

http://levi.cg.am/archives/3066

请问如何用PHP得到缓存的文件名称

备注:

  1. 这么做的目的是要清除某一个页面的nginx缓存
  2. 我试过这么写,但是不对

    md5('http://levi.cg.am/archives/3066');

用echo 模块调试变量

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template