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:
- 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)
- 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
精彩评论