Drupal is a registered trademark of Dries Buytaert
Drupal 11.4.3 Update released for Drupal core (11.4.3)! Views Bulk Operations (VBO) 4.4.6 Minor update available for module views_bulk_operations (4.4.6). External Authentication 2.0.12 Minor update available for module externalauth (2.0.12). Entityqueue 8.x-1.12 Minor update available for module entityqueue (8.x-1.12). Google Programmable Search Engine 5.0.5 Minor update available for module google_cse (5.0.5). Similar By Terms 2.0.0 Major update available for module similarterms (2.0.0). AI RAG Search Chat 1.0.7 Minor update available for module ai_rag_search_chat (1.0.7). MCP Sentinel 1.7.0 Minor update available for module mcp_sentinel (1.7.0). Provus Mega Menu Module provus_mega_menu crossed 1,000 active installs. Devel PHP 2.0.1 Module devel_php updated after 6 months of inactivity (2.0.1).

Cache Utility

274 sites Security covered
View on drupal.org

This module provides a user interface, Drush commands, and cURL commands to flush various caches, including PHP OPCache, APCu, and Drupal's database caches. It also offers features like truncating the cachetags table to prevent database growth and allows flushing PHP OPCache via Drush, which is typically not possible.

Cache Utility module provides an ability to view status and flush various caches in three ways:

  • Web browser user interface
  • Curl commands
  • Drush commands

The following caches are supported:

  • PHP OPCache
  • PHP APCu extension cache
  • Database cache_* tables
  • Database cachetags table
  • Clear Drupal cache via Curl

Other features

  • The module may also be configured to flush any of the above caches along with Drupal’s cache flush.
  • An optional sub-module adds links for flushing above caches under the "Drupal icon > Flush all Caches" via the contributed Admin Toolbar Extras module.

Benefits

  1. The Curl commands provide convenience of flushing various caches externally from the webserver. A single long secret code may be set to manage cache flushing on multiple sites.
  2. PHP OPCache, and APCu caches can be flushed without server restarts or adding obfuscated php files to the webserver.
  3. Enables flushing of PHP OPCache via drush which is normally not possible as drush executes using PHP-CLI and not the PHP used by webserver.
  4. Provides an ability to truncate cachetags database table which is not managed by Drupal core and in certain cases can have unlimited growth which drastically increases database size that may start to affect performance. See Drupal core issue # 3097393
  5. Provides an ability to truncate cache_* database tables.

Known issue

Truncating cache_* table for sqlite database does not work, due to unresolved Drupal core issue # 2949229

Configuration and Usage report Screenshot


Drush and Curl Commands

Documentation for the curl and drush command for each cache type is included on the module's configuration page at Configuration > Development > Cache Utility
Or at this path /admin/config/development/cache_utility

Sample commands

###############################################################################
# PHP OPCache
###############################################################################
Clear OPCache
Drush:   drush cu:opcache-clear --host https://example.com
Curl (site host):   curl -H 'Content-Type: application/json' -H 'CU-ACCESS-KEY: LONG_SECRET_KEY' https://example.com/admin/cache_utility/opcache/clear
Curl (localhost):   curl -H 'Content-Type: application/json' -H 'CU-ACCESS-KEY: LONG_SECRET_KEY' http://localhost/admin/cache_utility/opcache/clear

Get OPCache config
Drush:   drush cu:opcache-config --host https://example.com
Curl (site host):   curl -H 'Content-Type: application/json' -H 'CU-ACCESS-KEY: LONG_SECRET_KEY' https://example.com/admin/cache_utility/opcache/config
Curl (localhost):   curl -H 'Content-Type: application/json' -H 'CU-ACCESS-KEY: LONG_SECRET_KEY' http://localhost/admin/cache_utility/opcache/config

Get OPCache status
Drush:   drush cu:opcache-status --host https://example.com
Curl (site host):   curl -H 'Content-Type: application/json' -H 'CU-ACCESS-KEY: LONG_SECRET_KEY' https://example.com/admin/cache_utility/opcache/status
Curl (localhost):   curl -H 'Content-Type: application/json' -H 'CU-ACCESS-KEY: LONG_SECRET_KEY' http://localhost/admin/cache_utility/opcache/status

###############################################################################
# PHP APCu cache
###############################################################################
Clear APCu
Drush:   drush cu:apcu-clear --host https://example.com
Curl (site host):   curl -H 'Content-Type: application/json' -H 'CU-ACCESS-KEY: LONG_SECRET_KEY' https://example.com/admin/cache_utility/apcu/clear
Curl (localhost):   curl -H 'Content-Type: application/json' -H 'CU-ACCESS-KEY: LONG_SECRET_KEY' http://localhost/admin/cache_utility/apcu/clear

Get APCu config
Drush:   drush cu:apcu-config --host https://example.com
Curl (site host):   curl -H 'Content-Type: application/json' -H 'CU-ACCESS-KEY: LONG_SECRET_KEY' https://example.com/admin/cache_utility/apcu/config
Curl (localhost):   curl -H 'Content-Type: application/json' -H 'CU-ACCESS-KEY: LONG_SECRET_KEY' http://localhost/admin/cache_utility/apcu/config

Get APCu status
Drush:   drush cu:apcu-status --host https://example.com
Curl (site host):   curl -H 'Content-Type: application/json' -H 'CU-ACCESS-KEY: LONG_SECRET_KEY' https://example.com/admin/cache_utility/apcu/status
Curl (localhost):   curl -H 'Content-Type: application/json' -H 'CU-ACCESS-KEY: LONG_SECRET_KEY' http://localhost/admin/cache_utility/apcu/status

###############################################################################
# Database Cachetags table
###############################################################################
# View the status of database cachetags table
Drush:   drush cu:cachetags-status --host https://example.com
Curl (site host):   curl -H 'Content-Type: application/json' -H 'CU-ACCESS-KEY: LONG_SECRET_KEY' https://example.com/admin/cache_utility/cachetags/status
Curl (localhost):   curl -H 'Content-Type: application/json' -H 'CU-ACCESS-KEY: LONG_SECRET_KEY' http://localhost/admin/cache_utility/cachetags/status

# Truncate database cachetags table
Drush:   drush cu:cachetags-truncate --host https://example.com
Curl (site host):   curl -H 'Content-Type: application/json' -H 'CU-ACCESS-KEY: LONG_SECRET_KEY' https://example.com/admin/cache_utility/cachetags/clear
Curl (localhost):   curl -H 'Content-Type: application/json' -H 'CU-ACCESS-KEY: LONG_SECRET_KEY' http://localhost/admin/cache_utility/cachetags/clear

###############################################################################
# Database cache_* tables
###############################################################################
# View the status of database cache_* tables
Drush:   drush cu:cachetables-status --host https://example.com
Curl (site host):   curl -H 'Content-Type: application/json' -H 'CU-ACCESS-KEY: LONG_SECRET_KEY' https://example.com/admin/cache_utility/drupalcache/status
Curl (localhost):   curl -H 'Content-Type: application/json' -H 'CU-ACCESS-KEY: LONG_SECRET_KEY' http://localhost/admin/cache_utility/drupalcache/status

# Truncate all database cache_* tables
Drush:   drush cu:cachetables-truncate --host https://example.com
Curl (site host):   curl -H 'Content-Type: application/json' -H 'CU-ACCESS-KEY: LONG_SECRET_KEY' https://example.com/admin/cache_utility/drupalcachetables/clear
Curl (localhost):   curl -H 'Content-Type: application/json' -H 'CU-ACCESS-KEY: LONG_SECRET_KEY' http://localhost/admin/cache_utility/drupalcachetables/clear

# Clear Drupal's cache
Drush:   drush cr
Curl (site host):   curl -H 'Content-Type: application/json' -H 'CU-ACCESS-KEY: LONG_SECRET_KEY' https://example.com/admin/cache_utility/drupalcache/clear
Curl (localhost):   curl -H 'Content-Type: application/json' -H 'CU-ACCESS-KEY: LONG_SECRET_KEY' http://localhost/admin/cache_utility/drupalcache/clear

Activity

Total releases
1
First release
Jul 2026
Latest release
2 hours ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Active

Releases

Version Type Release date
1.4.0 Stable Jul 14, 2026