Craft Themes (4.x)

BlockCacheStrategy extends Component
in package
implements BlockCacheStrategyInterface

Base class for all block cache strategies

Interfaces, Classes and Traits

BlockCacheStrategyInterface
A cache strategy will cache a block differently according to various options

Table of Contents

$_options  : BlockCacheStrategyOptions
fields()  : array<string|int, mixed>
getCache()  : string|null
get a block cache data.
getDescription()  : string
Get strategy description
getOptions()  : BlockStrategyOptions
Get options model (populated)
setCache()  : mixed
Set a block cache
getOptionsModel()  : BlockStrategyOptions
Get options model

Properties

Methods

fields()

public fields() : array<string|int, mixed>
Tags
inheritDoc
Return values
array<string|int, mixed>

getDescription()

Get strategy description

public getDescription() : string
Tags
inheritDoc
Return values
string

setCache()

Set a block cache

public setCache(BlockInterface $block, string $data, TagDependency $dep) : mixed
Parameters
$block : BlockInterface
$data : string
$dep : TagDependency
Tags
inheritDoc
Return values
mixed

Search results