You are here

protected function BlockController::getCacheHash in Render cache 7.2

Parameters

object $object:

array $context:

Return value

array

Overrides BaseController::getCacheHash

File

modules/controller/render_cache_block/src/RenderCache/Controller/BlockController.php, line 90
Contains \Drupal\render_cache_block\RenderCache\Controller\BlockController

Class

BlockController
BlockController - Provides render caching for block objects.

Namespace

Drupal\render_cache_block\RenderCache\Controller

Code

protected function getCacheHash($object, array $context) {
  $hash['module'] = $context['module'];
  $hash['delta'] = $context['delta'];

  // Context module support.
  if (!empty($context['context']->name)) {
    $hash['context'] = $context['context']->name;
  }
  return $hash;
}