December 28, 2012 06:23PM
Hi All,

I would like to know if I can configure nginx to utilise different set of cache zone conditionally.

For example
- if the user-agent is a mobile device then use proxy_cache zone called "mobile_proxy_zone"
- if $http_cookie contains the word "semi-static" then use proxy_cache zone called "semistatic_proxy_zone"
- if user IP address is then use proxy_cache zone called "gws_internal_zone"
- Serve the rest using proxy_cache zone default_zone

At this point, I don't mind having the rules as first hit first serve ( ie if it matched user-agent then just use mobile_proxy_zone even when the semi-static is present on the $http_cookie )

Is this do able ?
Can we specify the proxy zone dynamically ?

Rianto Wahyudi
Subject Author Posted

Serve different set of cache conditionally

rwahyudi December 28, 2012 06:23PM

Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 127
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready