proxy_cache - Is there a way to cancel file caching from header filter?
Eugaia
ngx.eugaia at gmail.com
Wed Apr 13 19:17:52 MSD 2011
Hi,
On 13/04/2011 14:50, Anatoli Marinov wrote:
> I succeed to remove the file after it is saved in tmp directory and
> before to be moved in cache directory.
> The patch is little bit ugly :)
And wasteful too - it stores, then deletes the cache data.
> ...
>
> Now from any filter when I have instance of request structure I can
> set r->do_not_cache and the file will not be saved in cache directory.
> This approach is not so good because there is overhead when saving the
> file in tmp ... and this file will not be used later.
>
> Other ideas?
I think setting
r->upstream->cacheable = 0;
in your filter (if it's not the full document) should work, and will
avoid unnecessary caching.
Cheers,
Marcus.
More information about the nginx-devel
mailing list