Module Description
Summary: this module allows website builders to change the block cache metadata through the administrative block interface (see attached images). Learn more about cache metadata here. - - - - - - In Drupal 8, blocks, as well as pages, are built from the idea of ​​rendering arrays. Rendering arrays determine what is shown to the user. Therefore, arrays also determine how cacheable an answer is. This is done using the #cache key, for example:

$build = [   ...   '#cache' => [     'max-age' => 600,     'tags' => ['user: administer'],     'contexts' => ['user'],   ],   ... ]; Cacheability metadata consists of 3 properties:  max-age — for time-sensitive caching, i.e. time dependencies; contexts — for variations, i.e. dependencies on the request context; tags — for dependencies on data managed by Drupal, like entities & configuration.

Core modules and community modules determine the values ​​for this metadata. In addition, Drupal currently does not provide the possibility to change block cache metadata from the graphical interface, only by implementing specific hooks.

If you do not like the default set, you can install this module and easily change the settings through the graphical interface. After installing this module, the configuration form for each block will display a set of fields called Cache Settings, where you can configure the cache metadata as you see fit.

Installation Install as you would normally install a contributed Drupal module, for example:

$ composer require 'drupal/blocache:^2.0'

View Installing Modules for further information.

Maintainers Developed and maintained by:


* Douglas Rosa Pilar (docapilar)
* Dexa



Project Usage
827
Creation Date
Changed Date
Security Covered
Covered By Security Advisory
Version Available
Production
Module Summary
This module aims to solve the issue of not being able to change block cache metadata through the graphical interface in Drupal 8.
Data Name
blocache

OPENAI CHATBOT

OPENAI CHATBOT

08:35:50
Generic Chatbot
Hi, I'm a Drupal module expert powered by OpenAI, answering your questions about the Drupal module ecosystem. How can I be helpful today? Please note that we will log your question.