Redis Object Cache 3.0.1 has 10 actions and 10 filters, read directly from its source code on Nov 17, 2026. The list updates automatically when a new version is released.
How to use these hooks
Actions let you run your own code at a specific moment. Filters let you change a value before the plugin uses it. Put your code in a child theme's functions.php or a code-snippets plugin, never in the plugin's own files, because updates overwrite them.
// Run your own code when Redis Object Cache fires an action
add_action( 'redis_object_cache_update_dropin', function( $result ) {
// Your code runs here.
}, 10, 1 );
// Change a value Redis Object Cache is about to use
add_filter( 'redis_cache_expiration', function( $expire, $key, $group, $orig_exp ) {
// Change $expire here.
return $expire;
}, 10, 4 );Parts of a name in {braces} are filled in at runtime (for example a post type or field ID). Choose Example on any hook for a ready-to-edit snippet.
All hooks
-
redis_cache_expiration
filter/** * Filters the cache expiration time */ apply_filters( 'redis_cache_expiration', $expire, $key, $group, $orig_exp ); -
/** * Fires on cache update-dropin event */ do_action( 'redis_object_cache_update_dropin', $result ); -
redis_object_cache_delete
action/** * Fires on every cache key deletion */ do_action( 'redis_object_cache_delete', $key, $group, $execute_time ); -
redis_object_cache_disable
action/** * Fires on cache disable event */ do_action( 'redis_object_cache_disable', $result ); -
redis_object_cache_enable
action/** * Fires on cache enable event */ do_action( 'redis_object_cache_enable', $result ); -
redis_object_cache_get_value
filter/** * Filters the return value */ apply_filters( 'redis_object_cache_get_value', $value, $key, $group, $force, $found ); -
redis_object_cache_set
action/** * Fires on every cache set */ do_action( 'redis_object_cache_set', $key, $value, $group, $expiration, $execute_time ); -
/** * Filters list of groups to be added to {@see self::$ignored_groups} */ apply_filters( 'redis_cache_add_non_persistent_groups', (array) $groups ); -
/** * Filters the capability used to determine if a user can manage Redis. */ apply_filters( 'redis_cache_manager_capability', $capability ); -
redis_cache_validate_dropin
filter/** * Filters the drop-in validation state */ apply_filters( 'redis_cache_validate_dropin', $dropin['PluginURI'] === $plugin['PluginURI'], $dropin['PluginURI'], $plugin['PluginURI'] ); -
redis_object_cache_error
action/** * Fires when an object cache related error occurs. */ do_action( 'redis_object_cache_error', $exception, $exception->getMessage() ); -
redis_object_cache_flush
action/** * Fires on every cache flush */ do_action( 'redis_object_cache_flush', $results, 0, $selective, $salt, $execute_time ); -
/** * Fires on every group cache flush */ do_action( 'redis_object_cache_flush_group', $results, $salt, $execute_time ); -
redis_object_cache_get
action/** * Fires on every cache get request */ do_action( 'redis_object_cache_get', $key, $value, $group, $force, $found, $execute_time ); -
/** * Fires on every cache get multiple request */ do_action( 'redis_object_cache_get_multiple', $keys, $cache, $group, $force, $execute_time ); -
roc_tab_classes
filter/** * Filters the current tab's css classes */ apply_filters( 'roc_tab_classes', $classes, $this ); -
roc_tab_id
filter/** * Filters the tab's id */ apply_filters( 'roc_tab_id', $tab_id, $this ); -
file_mod_allowed
filterapply_filters( 'file_mod_allowed', $allowed, 'object_cache_dropin' );
Generated from Redis Object Cache's GPL-licensed source code. Hooks inside bundled third-party libraries are not listed.
Can't find the right hook?
We can build the customisation for you. Describe what you need: