Shopify / response_bank

Simple response caching for Ruby applications
http://www.shopify.com
MIT License
135 stars 18 forks source link

Allow skipping the browser cache #81

Closed grcooper closed 1 year ago

grcooper commented 1 year ago

There are some cases where we might want to skip out on returning the browser cache. We have a case internally where we cannot update the version on the cache key at the right time and so rather than forcefully updating that version right before a request under certain conditions, we are instead just skipping the browser cache.

This especially causes problems when we set the cacheable.versioned-cache-expiry because the browser's cache key may not be expired yet, but the underlying cache key is.

There is likely a better fix to the above problem using the Cache-Control headers, but this is a fairly simple fix for now that allows us to move forward.