Craft Themes (3.x)

BlockCacheStrategyInterface

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

Table of Contents

buildKey()  : array<string|int, mixed>
Get the cache key elements specific to this strategy
getCache()  : string|null
get a block cache data.
getDescription()  : string
Get strategy description
getDuration()  : int|null
Get cache duration (seconds).
getHandle()  : string
Get strategy handle
getName()  : string
Get strategy name
getOptions()  : BlockStrategyOptions
Get options model (populated)
setCache()  : mixed
Set a block cache

Methods

getDuration()

Get cache duration (seconds).

public getDuration() : int|null

Returning null will use Yii default caching duration. 0 means infinity.

Return values
int|null

Search results