Conditional Proxy Caching in Location

Igal Sapir igal at lucee.org
Sun Sep 13 22:42:28 UTC 2020


Hello,

I have a variable that shows if a certain cookie exists in the Request,
e.g. $req_has_somecookie, and I want to be able to use proxy_cache only for
specific URIs, e.g. /slow-page/ if the variable is 0.

I know that "if" is evil as it creates a new location scope.

What's the best way to handle this?

Thanks,

Igal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20200913/56c98272/attachment.htm>


More information about the nginx mailing list