使nginx缓存无效

时间:2017-04-12 12:08:49

标签: nginx

    I have cached js,css and html files using nginx to improve web page performance.

    how can i invalidate nginx cache for specific cache key?

    I have implemented like follows:

使URl无效:http://localhost/invalidate_cached_url/?url=[your_url]         - 从nginx反向代理缓存中删除页面。         location ^〜/ invalidate_cached_url / {             允许127.0.0.1;             否认所有;             proxy_cache_purge nginx_cache $ arg_url;         }

when i start nginx service it is giving error "unknown directive :proxy_cache_purge". 

0 个答案:

没有答案