Craft Themes (3.x)

BlockCacheService extends Service
in package

Table of Contents

BLOCK_CACHE_TAG  = 'themes::blocks'
REGISTER_STRATEGIES  = 'register_strategies'
$cache  : CacheInterface
$cacheEnabled  : bool
$_strategies  : array<string|int, BlockCacheStrategyInterface>
flush()  : mixed
Flush all block cache
getCache()  : string|null
Get a block cache
getStrategies()  : array<string|int, BlockCacheStrategyInterface>
Get all strategies
getStrategy()  : BlockCacheStrategyInterface
Get a strategy by handle
hasStrategy()  : bool
Does a strategy handle exist
startCaching()  : mixed
Start block caching
stopCaching()  : mixed
Stop block caching
blockCacheService()  : BlockCacheService
Get the block cache service
blockProviderService()  : BlockProvidersService
Get the block providers service
blocksService()  : BlockService
Get the blocks service
displayService()  : DisplayService
Get the display service
eagerLoadingService()  : EagerLoadingService
Get the eager loading service
fieldDisplayersService()  : FieldDisplayerService
Get the field displayers service
fieldsService()  : FieldsService
Get the fields service
fileDisplayerService()  : FileDisplayerService
Get the file displayers service
groupsService()  : GroupsService
Get the groups service
layoutService()  : LayoutService
Get the layout service
matrixService()  : MatrixService
Get the matrix service
register()  : mixed
Register cache strategies
setCache()  : mixed
Set a block cache
shouldCache()  : bool
Should a block be cached
themesRegistry()  : ThemesRegistry
Get the themes registry
triggerEvent()  : mixed
Triggers an event
viewModesService()  : ViewModeService
Get the view mode service
viewService()  : ViewService
Get the view service

Constants

REGISTER_STRATEGIES

public mixed REGISTER_STRATEGIES = 'register_strategies'

Properties

Methods

flush()

Flush all block cache

public flush() : mixed
Return values
mixed

hasStrategy()

Does a strategy handle exist

public hasStrategy(string $handle) : bool
Parameters
$handle : string
Return values
bool

matrixService()

Get the matrix service

protected matrixService() : MatrixService
Return values
MatrixService

register()

Register cache strategies

protected register() : mixed
Return values
mixed

triggerEvent()

Triggers an event

protected triggerEvent(string $type, Event $event) : mixed
Parameters
$type : string
$event : Event
Return values
mixed

Search results