DadsFam Cache 1.9.1 has 7 actions and 19 filters, read directly from its source code on Nov 19, 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 DadsFam Cache fires an action
add_action( 'dadsfam_cache_deactivated', function() {
// Your code runs here.
}, 10, 1 );
// Change a value DadsFam Cache is about to use
add_filter( 'dadsfam_cache_admin_localize', function( $data ) {
// Change $data here.
return $data;
}, 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
-
/** * Filter the data handed to the admin JavaScript. */ apply_filters( 'dadsfam_cache_admin_localize', $data ); -
/** * Register settings tabs. */ apply_filters( 'dadsfam_cache_admin_tabs', $tabs ); -
/** * Register AJAX tasks. */ apply_filters( 'dadsfam_cache_ajax_tasks', $tasks ); -
/** * Whether to rebuild the cache automatically after a full purge. */ apply_filters( 'dadsfam_cache_auto_preload', false ); -
/** * Last-chance veto for developers. */ apply_filters( 'dadsfam_cache_cache_this_request', true ); -
/** * Filter the capability required to read or change cache settings. */ apply_filters( 'dadsfam_cache_capability', 'manage_options' ); -
/** * Fires when the free plugin is deactivated, so add-ons can clear their own * scheduled jobs before they go dormant. */ do_action( 'dadsfam_cache_deactivated' ); -
/** * Add rows to the support debug panel. */ apply_filters( 'dadsfam_cache_debug_info', $dadsfam_cache_debug ); -
/** * Filter the complete rule block before it is written. */ apply_filters( 'dadsfam_cache_htaccess_rules', $lines ); -
/** * Rules injected before ours. DadsFam Cache Pro uses this for its WebP * rewrite, which has to come first so it can win before anything else claims * the image request. */ apply_filters( 'dadsfam_cache_htaccess_rules_before', array() ); -
/** * Fires once DadsFam Cache is fully loaded and safe to extend. */ do_action( 'dadsfam_cache_loaded', DADSFAM_CACHE_VERSION ); -
/** * Filter the NGINX snippet shown to the user. */ apply_filters( 'dadsfam_cache_nginx_snippet', $lines ); -
/** * Transform the finished page before it is cached. */ apply_filters( 'dadsfam_cache_page_html', $html, array( 'path' => self::$path, 'https' => self::$https, 'mobile' => self::$mobile, ) ); -
/** * Extra preload settings. */ do_action( 'dadsfam_cache_preload_settings' ); -
/** * Filter the preload queue before it runs. */ apply_filters( 'dadsfam_cache_preload_urls', array_values( $urls ) ); -
/** * Extra paths to clear when this post changes. */ apply_filters( 'dadsfam_cache_purge_post_paths', $paths, $post_id ); -
/** * Fires after the whole page cache has been purged. */ do_action( 'dadsfam_cache_purged_all' ); -
/** * Fires after a deep purge, so add-ons can drop their own artefacts. */ do_action( 'dadsfam_cache_purged_everything' ); -
/** * Sanitize add-on settings. */ apply_filters( 'dadsfam_cache_sanitize_settings', $clean, $raw ); -
/** * Register extra settings defaults. */ apply_filters( 'dadsfam_cache_settings_defaults', $defaults ); -
/** * Fires after settings are saved and the on-disk artefacts are refreshed. */ do_action( 'dadsfam_cache_settings_saved', $clean ); -
/** * Let add-ons contribute their own known-safe settings. */ apply_filters( 'dadsfam_cache_speed_setup', array( $s, $done ) ); -
apply_filters( 'dadsfam_cache_has_addon', false ); -
apply_filters( 'dadsfam_cache_is_pro', false ); -
do_action( 'dadsfam_cache_purged_post', $post_id, $paths );
Generated from DadsFam Cache's GPL-licensed source code. Hooks inside bundled third-party libraries are not listed.
Done for you
Rather have it built for you?
Tell us what should change and we’ll write and test the code using these hooks.
Custom hook snippet
from $49
A small, update-safe change built on the plugin’s own hooks.
- Code written against the plugin’s actions and filters
- Tested on a staging copy of your site
- Install instructions included
Typical turnaround: 2–3 business days
Choose thisPlugin customisation
from $149
New features or changed behaviour, without editing the plugin’s files.
- Built as a companion plugin, so updates never wipe it
- Exact quote before we start
- Tested on staging, then deployed
Typical turnaround: 3–7 business days
Choose thisNot sure which fits? Describe what you need and we’ll suggest the simplest option.
Can't find the right hook?
We can build the customisation for you. Describe what you need: