Hi,
i know how to *prevent* caching if custom headers are set by upstream with proxy_cache_bypass and proxy_no_cache.
This time i'd like to do the opposite, i want the response to be cached *only* if a custom header is present.
I tried something like:
set $nocache 1;
proxy_no_cache $nocache;
...
if ($upstream_http_myheader = 1) {
set $nocache 0;
}
But this doesn't work. Any ideas or am i missing something?
cheers
Thomas Lohner