protected function CartBlockBase::buildCache in Commerce Cart Blocks 8
2 calls to CartBlockBase::buildCache()
- CartBlock::build in src/
Plugin/ Block/ CartBlock.php - Builds the cart block.
- CartButtonBlock::build in src/
Plugin/ Block/ CartButtonBlock.php - Builds the cart block.
File
- src/
Plugin/ Block/ CartBlockBase.php, line 160
Class
- CartBlockBase
- CartBlockBase class.
Namespace
Drupal\commerce_cart_blocks\Plugin\BlockCode
protected function buildCache() {
$cacheableMetadata = $this
->getCacheabilityMetadata();
return [
'contexts' => $cacheableMetadata
->getCacheContexts(),
'tags' => $cacheableMetadata
->getCacheTags(),
'max-age' => $cacheableMetadata
->getCacheMaxAge(),
];
}