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 Slack to see if there may be a better way to achieve your goals.
Resources on HTTP Caching
Help Us Improve this Doc
Was this helpful? Open a GitHub issue to report a problem with this doc, suggest an improvement, or otherwise provide feedback. Thanks!