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() : 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
$_options
protected
BlockCacheStrategyOptions
$_options
Methods
fields()
public
fields() : mixed
Tags
Return values
mixed —getCache()
get a block cache data.
public
getCache(BlockInterface $block) : string|null
Parameters
- $block : BlockInterface
Tags
Return values
string|null —getDescription()
Get strategy description
public
getDescription() : string
Tags
Return values
string —getOptions()
Get options model (populated)
public
getOptions() : BlockStrategyOptions
Tags
Return values
BlockStrategyOptions —setCache()
Set a block cache
public
setCache(BlockInterface $block, string $data, TagDependency $dep) : mixed
Parameters
- $block : BlockInterface
- $data : string
- $dep : TagDependency
Tags
Return values
mixed —getOptionsModel()
Get options model
protected
abstract getOptionsModel() : BlockStrategyOptions