WordPress action hook
ct_clean_object_cache
Fired by 5 WordPress plugins, running on 16K+ sites between them.
“Fires immediately after the given object's cache is cleaned.”
How to use ct_clean_object_cache
It's an action: your callback runs at that point and receives 2 arguments. Nothing needs to be returned.
Add this to your theme's functions.php or a small custom plugin:
add_action( 'ct_clean_object_cache', function( $arg1, $object ) {
// Your code runs here.
}, 10, 2 );Argument names come from GamiPress's source. Other plugins may pass different values: check the call in the plugin you're targeting below.
5 plugins that fire ct_clean_object_cache
Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.
-
GamiPress10,000+ installs
do_action( 'ct_clean_object_cache', $object->$primary_key, $object )libraries/ct/includes/functions.php:543 -
AutomatorWP6,000+ installs
do_action( 'ct_clean_object_cache', $object->$primary_key, $object )libraries/ct/includes/functions.php:543 -
ShortLinks Pro100+ installs
do_action( 'ct_clean_object_cache', $object->$primary_key, $object )libraries/ct/includes/functions.php:543 -
BBForms20+ installs
do_action( 'ct_clean_object_cache', $object->$primary_key, $object )libraries/ct/includes/functions.php:543 -
WhatAvatar20+ installs
do_action( 'ct_clean_object_cache', $object->$primary_key, $object )libraries/ct/includes/functions.php:543
Need a customisation built on this hook?
Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.