All major content, browse, and search pages are cached for a short and configurable duration by an HTTP cache. This allows the system to serve a large number of requests in a short period of time.
module Workarea class Storefront::PagesController < Storefront::ApplicationController before_filter :cache_page # ... end end
Controller/actions which enable this include:
Customizing the Rack::Cache Key
There are scenarios where it becomes necessary to vary
Rack::Cache entries, like geolocated content blocks or segmentation-based navigation. In these cases, Workarea provides a relatively straight-forward way to add to the cache key. Refer to the documentation in the code for Workarea::Cache::Varies for more information.
Workarea::Cache::Varies can have a very adverse affect on application performance, and is not encouraged. Make sure this is what you need, and feel free to reach out on the developer Discourse to see if there may be a better way to achieve your goals.
Resources on HTTP Caching
How'd We Do?
Was this article missing something?
Was it not quite what you were looking for?
Do you have suggestions on how we could improve this article or your experience in general?
If so, please take a moment to let us know!
Your invaluable feedback will help everyone better understand the platform!