You are here

protected function Block::getCacheType in Views (for Drupal 7) 8.3

Provide a single method to figure caching type, keeping a sensible default for when it's unset.

2 calls to Block::getCacheType()
Block::buildOptionsForm in lib/Views/block/Plugin/views/display/Block.php
Provide the default form for setting options.
Block::executeHookBlockList in lib/Views/block/Plugin/views/display/Block.php
The default block handler doesn't support configurable items, but extended block handlers might be able to do interesting stuff with it.

File

lib/Views/block/Plugin/views/display/Block.php, line 142
Definition of Drupal\views\Plugin\views\display\Block. Definition of Views\block\Plugin\views\display\Block.

Class

Block
The plugin that handles a block.

Namespace

Views\block\Plugin\views\display

Code

protected function getCacheType() {
  $cache_type = $this
    ->getOption('block_caching');
  if (empty($cache_type)) {
    $cache_type = DRUPAL_NO_CACHE;
  }
  return $cache_type;
}