protected function BlockController::getDefaultCacheInfo in Render cache 7.2
Provides the cache info for all objects based on the context.
Parameters
array $context:
Return value
array
Overrides BaseController::getDefaultCacheInfo
File
- modules/
controller/ render_cache_block/ src/ RenderCache/ Controller/ BlockController.php, line 48 - Contains \Drupal\render_cache_block\RenderCache\Controller\BlockController
Class
- BlockController
- BlockController - Provides render caching for block objects.
Namespace
Drupal\render_cache_block\RenderCache\ControllerCode
protected function getDefaultCacheInfo($context) {
$default_cache_info = parent::getDefaultCacheInfo($context);
// The block cache renders to markup by default.
$default_cache_info['render_cache_render_to_markup'] = TRUE;
return $default_cache_info;
}