Cachify icon
Performance & Caching

Cachify hooks reference

  • By pluginkollektiv
  • v2.4.2
  • Updated

Cachify 2.4.2 has 2 actions and 9 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.

functions.phpyour child theme
// Run your own code when Cachify fires an action
add_action( 'cachify_flushed_total_cache', function( $clear_all_methods ) {
	// Your code runs here.
}, 10, 1 );

// Change a value Cachify is about to use
add_filter( 'cachify_create_gzip_files', function( $value ) {
	// Change $value here.
	return $value;
}, 10, 1 );

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

  • inc/class-cachify-hdd.php line 46
    /**
     * Filter that allows to enable/disable gzip file creation
     */
    apply_filters( 'cachify_create_gzip_files', true );
  • inc/class-cachify.php line 1565
    /**
     * Call hook for further actions after total cache has been flushed.
     */
    do_action( 'cachify_flushed_total_cache', $clear_all_methods );
  • inc/class-cachify.php line 1619
    /**
     * Filters the buffered data itself
     */
    apply_filters( 'cachify_modify_output', $data, self::$method, self::_cache_hash(), self::_cache_expires() );
  • inc/class-cachify-redis.php line 226
    /**
     * Filter hook to adjust Redis connection parameters
     */
    apply_filters( 'cachify_redis_servers', array( 'localhost' ) );
  • inc/class-cachify.php line 1231
    /**
     * Call hook for further actions after cache has been flushed for a single
     * page.
     */
    do_action( 'cachify_removed_cache_by_url', $url, $hash );
  • inc/class-cachify.php line 1598
    /**
     * Filters whether the buffered data should actually be cached
     */
    apply_filters( 'cachify_store_item', 200 === http_response_code(), $data, self::$method, self::_cache_hash(), self::_cache_expires() );
  • inc/class-cachify.php line 691 · used in 4 places
    apply_filters( 'cachify_user_can_flush_cache', current_user_can( 'manage_options' ) );
  • inc/class-cachify.php line 1369
    apply_filters( 'cachify_flush_cache_hooks', $flush_cache_hooks );
  • inc/class-cachify-memcached.php line 269
    apply_filters( 'cachify_memcached_servers', array( array( '127.0.0.1', 11211, ), ) );
  • inc/class-cachify.php line 1486
    apply_filters( 'cachify_minify_ignore_tags', array( 'textarea', 'pre', ) );
  • inc/class-cachify.php line 1410
    apply_filters( 'cachify_skip_cache', false );

Generated from Cachify'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: