method

http_cache_forever

Importance_1
Ruby on Rails latest stable (v7.1.3.2) - 0 notes - Class: ActionController::ConditionalGet
http_cache_forever(public: false) public

Cache or yield the block. The cache is supposed to never expire.

You can use this method when you have an HTTP response that never changes, and the browser and proxies should cache it indefinitely.

  • public: By default, HTTP responses are private, cached only on the user’s web browser. To allow proxies to cache the response, set true to indicate that they can serve the cached response to all users.

Show source
Register or log in to add new notes.