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

Re: Cache Proxy - "cacheable asset" clarification / sanity check

$
0
0
So, a little followup on this. In case anyone else finds themselves in the same situation. I dug into docs a bit more and reading, I realized I needed to look at the (!precise!) config for proxy_cache_key. A bit more reading of online docs / and some various online discussions.. I adjusted my config

# new setting that worked
proxy_cache_key "$host$uri$is_args$args";

# old setting that did not work
# proxy_cache_key "$scheme$host$request_uri";

then test/restart nginx; delete manually the content of the /path/to/cache/on/disk
... and happy days, I am now getting cache hits for the URL, http://web.server.name/path/to/css - whereas in the past I was getting MISS on the cache 100% of the time for this URL.

After making the adjustment, there was a plainly visible change to page load performance for the website. Everything moved from being "Meh-ok-good" performance to being "Wow-fast-visibly-snappy-quick". So this is nice.

After ~overnight things appear to be in a good place. So I think the issue is resolved.

So. I guess the answer to my post question, "what defines a cachable asset?" - the answer, is, whatever you configured your proxy_cache_key settings to be in your nginx setup. Woot.

Hope this info is of slight use-help-interest to someone else, sometime. Maybe.


Tim Chipman

Viewing all articles
Browse latest Browse all 4759

Trending Articles



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