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