instance method only_if_cached?

Ruby on Rails 8.1.2

Since v8.1.2

Signature

only_if_cached?()

Returns true if the only-if-cached directive is present. This directive indicates that the client only wishes to obtain a stored response. If a valid stored response is not available, the server should respond with a 504 (Gateway Timeout) status.

Source
# File actionpack/lib/action_dispatch/http/cache.rb, line 91
          def only_if_cached?
            @only_if_cached
          end

Defined in actionpack/lib/action_dispatch/http/cache.rb line 91 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActionDispatch::Http::Cache::Request::CacheControlDirectives

Type at least 2 characters to search.

↑↓ navigate · open · esc close