Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

Redirect depending on $upstream_cache_status

$
0
0
Is there a way to jump to different locations depending on $upstream_cache_status?
I tried something like

set $skip_cache 0;
if ($upstream_cache_status = HIT) {
set $skip_cache 0;
}
if ($upstream_cache_status != HIT) {
set $skip_cache 1;
}

But $upstream_cache_status returns empty value.

content_by_lua also returns empty value.

Thanks in advance

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>