module

ActionController::ConditionalGet

Instance methods

fresh_when(*, etag : String | Nil = nil, weak_etag : String | Nil = nil, strong_etag : String | Nil = nil, last_modified : Time | Nil = nil, public : Bool = false) : Bool

fresh_when(etag: "v1") — слабый валидатор; strong_etag: — сильный. Возвращает true, если ответ fresh (выставлен 304), иначе false.

Source
stale?

stale? — инверсия fresh_when: true → ответ устарел, рендерить.

Source