Advertising sustains the DA. Ads are hidden for members. Join today

CacheFlush

Last updated on
31 May 2017

Drupal 7 will no longer be supported after January 5, 2025. Learn more and find resources for Drupal 7 sites

CacheFlush provides a fine granularity of control over cache tables, functions and permissions.

It ships with a predefined set of actions, but can be configured to build any number of custom presets suitable for both both development and production environments. Access to each preset can be limited by role-based permissions.

Version 3 of the project consists of the following modules:

  • CacheFlush - Allows you to create configurable cache flusher presets.
  • CacheFlush Advanced - Provide advanced options for the Cacheflush module.
  • CacheFlush Cron - CacheFlush cron job for presets.
  • CacheFlush Drush - CacheFlush drush support.
  • CacheFlush Entity - CacheFlush Entity store presets.
  • CacheFlush Memcache - Provide memcache integration for the Cacheflush module.
  • CacheFlush Rules - Provide rules integration for the Cacheflush module.
  • CacheFlush UI - CacheFlush User interface.
  • CacheFlush Varnish - Provide varnish clear for the Cacheflush module.

Installation

Install as you would normally install a contributed drupal module. See: Installing modules (D7) or Installing contributed modules (D8) for further information.

Configuration

To use the module with the "Clear All" (Clear all cache) preset, enable the modules CacheFlush and CacheFlush Entity. This will result in a "Cache Flush" entry appearing in the top-level administration toolbar. Access to this preset is controlled by the permission "Cacheflush clear cache".

To create other presets, enable CacheFlush UI. This will let you configure settings under admin/structure/cacheflush.

To add a preset, click "Add cacheflush". This will expose the cache database tables in vertical tabs. Select those you want to truncate when this preset is executed. Give the preset a name, and click "Save".

To provide access to the preset through the GUI, add a menu. Select the preset (e.g. "cache_page"), and choose "Add menu entry" from the pull down options menu, and click "Update".

In order to give the editor access to this preset, give the permission "Clear any entity" to the editor role.

Drush support

To to clear cache using the preset via drush, enable the CacheFlush Drush module.

To list preset options, type drush cf. To excecute preset 1, type drush cf 1.

Tags

Help improve this page

Page status: No known problems

You can: