This repository was archived by the owner on Feb 17, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
7.x 2.x cache warming
Andy Truong edited this page Jan 7, 2014
·
9 revisions
To flush cached tags on some special events of Drupal, define %your_module/config/cache_warming.yml
tags:
entity_update: ['my_tag_1', 'my_tag_2']
enttiy_delete: ['%entity_type:%entity_bundle:%entity_id', '%type:%bundle:%id']
user_login: []
user_logout: []To define your own event:
use \Drupal\at_base\Cache\Warmer as CacheWarmer;
/**
* Implements hook_user_login()
*/
function at_base_user_logout($account) {
$warmer = new CacheWarmer('user_logout');
$warmer->setEntity('user', $account);
$warmer->warm();
} ___ ___________ _ _
/ _ \_ _| ___ \ | | | |
/ /_\ \| | | |_/ / __ _ ___ ___ _ __ ___ ___ __| |_ _| | ___
| _ || | | ___ \/ _` / __|/ _ \ | '_ ` _ \ / _ \ / _` | | | | |/ _ \
| | | || | | |_/ / (_| \__ \ __/_| | | | | | (_) | (_| | |_| | | __/
\_| |_/\_/ \____/ \__,_|___/\___(_)_| |_| |_|\___/ \__,_|\__,_|_|\___|
- Caching
- Twig template
- twig Service
- twig_string Service
- Recipes
- Extends
- Easy Block
- Easy Routing
- Easy Breadcrumb
- Entity Template
- Drush Commands:
- Functions:
- Misc
- Status
- Tools for Development enviroment
- /devel/php improved
- /at/sql
- /at/twig
- Kint integration