February 2022

Cache Expire: Drupal 7 module to flush the cache

Cache Expire is a Drupal 7 module to automatically flush the cache when node or a comment is published or updated, this module only flushes the cache without rebuilding the system bootstrap. The module empties the tables: cache cache_block cache_filter cache_form cache_menu cache_page cache_path cache_views cache_views_data and it self integrate with Cloudflare Cache Clear and with APC patched for APCu . Here the code: <?php /** * @file * * Expires caches automatically when certain Drupal actions are taken. */ /** * Implements hook_menu(). */ function cache_expire_menu() { $items['admin/config/system/cache_expire'] = array( 'title' => 'Cache Expire', 'description' => 'Configuration for Cache Expire.', 'page callback' => 'drupal_get_form', 'page arguments' => array('...