module

ActionView::Helpers::CacheHelper

Instance methods

cache(name : String | Nil = nil, *, expires_in : Time::Span | Nil = nil, &) : String

cache("key") { ... } — the block's output goes to the page buffer and is stored under the fragment key; a hit replays the stored content. Returns "" (the block content is concatenated, like Rails' safe_concat).

Source
cache_if(condition : Bool, name : String | Nil = nil, *, expires_in : Time::Span | Nil = nil, &) : String
Source
cache_unless(condition : Bool, name : String | Nil = nil, *, expires_in : Time::Span | Nil = nil, &) : String
Source
fragment_cache_key(name : String | Nil) : String

Explicit string keys pass through unchanged.

Source