You are here

protected function BaseController::getDefaultCacheInfo in Render cache 7.2

Provides the cache info for all objects based on the context.

Parameters

array $context:

Return value

array

Overrides AbstractBaseController::getDefaultCacheInfo

3 calls to BaseController::getDefaultCacheInfo()
BaseController::view in src/RenderCache/Controller/BaseController.php
BlockController::getDefaultCacheInfo in modules/controller/render_cache_block/src/RenderCache/Controller/BlockController.php
Provides the cache info for all objects based on the context.
PageController::getDefaultCacheInfo in modules/controller/render_cache_page/src/RenderCache/Controller/PageController.php
Provides the cache info for all objects based on the context.
2 methods override BaseController::getDefaultCacheInfo()
BlockController::getDefaultCacheInfo in modules/controller/render_cache_block/src/RenderCache/Controller/BlockController.php
Provides the cache info for all objects based on the context.
PageController::getDefaultCacheInfo in modules/controller/render_cache_page/src/RenderCache/Controller/PageController.php
Provides the cache info for all objects based on the context.

File

src/RenderCache/Controller/BaseController.php, line 256
Contains \Drupal\render_cache\RenderCache\Controller\BaseController

Class

BaseController
Base class for Controller plugin objects.

Namespace

Drupal\render_cache\RenderCache\Controller

Code

protected function getDefaultCacheInfo($context) {
  return array(
    // @todo indentation.
    // Drupal 7 properties.
    'bin' => 'cache_render',
    'expire' => RenderCache::CACHE_PERMANENT,
    // Use per role to support contextual and its safer anyway.
    'granularity' => DRUPAL_CACHE_PER_ROLE,
    'keys' => array(),
    // Drupal 8 properties.
    'tags' => array(),
    // Proposed Drupal 8 properties.
    'max-age' => array(),
    'downstream-ttl' => array(),
    // Allows special rendering via big pipe, esi, etc.
    'render_strategy' => array(),
    // Render Cache specific properties.
    // @todo Port to Drupal 8.
    'hash' => array(),
    'validate' => array(),
    // Special keys that are only related to our implementation.
    // @todo Remove and replace with something else.
    'render_cache_render_to_markup' => FALSE,
    // New internal properties.
    'render_cache_ignore_request_method_check' => FALSE,
    'render_cache_cache_strategy' => NULL,
    'render_cache_preserve_properties' => array(),
    'render_cache_preserve_original' => FALSE,
  );
}