public function Block::getCacheType

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

1 call to Block::getCacheType()
Block::buildOptionsForm in drupal/core/modules/block/lib/Drupal/block/Plugin/views/display/Block.php
Provide the default form for setting options.

File

drupal/core/modules/block/lib/Drupal/block/Plugin/views/display/Block.php, line 115
Definition of Drupal\views\Plugin\views\display\Block. Definition of Drupal\block\Plugin\views\display\Block.

Class

Block
The plugin that handles a block.

Namespace

Drupal\block\Plugin\views\display

Code

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