nginx reverse proxy, when to use cache vs store?

Solution 1:

If memory serves me correctly, proxy_store stores a binary representation of a request for an item whereas proxy_cache stores a cached copy of the item in it's base form.

proxy_cache is actually a proper caching engine with multiple levels and is suitable for storing content from multiple sites using the same keys.

I personally use proxy_cache to store over 2 billion product images on each of our static content servers.

Solution 2:

proxy_store is used to create an 'on demand' mirror of objects. It puts items in the same path that the given item exists at on the backend.

In the case of slow dynamic content, proxy_cache is more appropriate, as it supports expiry of the cache.

An example of where proxy_store is more useful might be a mirror of rpm files where one filename/version will never need to be expired.