开发者

How can I selectively clear the cache for Sinatra + Nginx + Phusion Passenger?

I have a开发者_Go百科 modular Sinatra app running on nginx with Phusion Passenger. When I alter my app (and in particular, some YAML files which are used to generate pages), I'd like to be able to clear only the parts of my cache that are affected (and leave evertyhing else in /public alone--I know I can just clean out the whole cache, but I was hoping not to).

Thanks!


you could:

  1. set up 2 cachezone's in nginx with 2 proxy_cache_path directive in your ninx http block (see http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_cache_path for specifics)
  2. then refer to the defined zone-names in proxy_cache directives in your location blocks

you can then clear just the cache for the yaml-generated stuff

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜