Proxy Cache Purge 5.12.3 has 5 actions and 30 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 Proxy Cache Purge fires an action
add_action( 'after_purge_tags', function( $tags, $pattern, $purgeme, $response, $headers ) {
// Your code runs here.
}, 10, 5 );
// Change a value Proxy Cache Purge is about to use
add_filter( 'varnish_http_purge_cache_tags_advertised', 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
-
/** * Filter whether cache tags support is advertised when explicitly overridden * by VHP_VARNISH_TAGS. */ apply_filters( 'varnish_http_purge_cache_tags_advertised', (bool) VHP_VARNISH_TAGS ); -
varnish_http_purge_headers
filter/** * Filters the HTTP headers to send with a PURGE request. */ apply_filters( 'varnish_http_purge_headers', $default_headers ); -
/** * Decide whether this batch of URL purges should bypass the cron queue. */ apply_filters( 'vhp_purge_bypass_cron_for_request', false, 'urls', $payload ); -
vhp_purge_use_cron
filter/** * Filter whether the async purge queue + WP-Cron should be used. */ apply_filters( 'vhp_purge_use_cron', $enabled ); -
after_purge_tags
action/** * Fires after a tag-pattern purge request has been sent. */ do_action( 'after_purge_tags', $tags, $pattern, $purgeme, $response, $headers ); -
/** * Send back the actions array, filtered */ apply_filters( 'varnish_http_purge_events_full', $actions ); -
/** * Filter the list of valid post statuses that trigger purge URL generation. */ apply_filters( 'varnish_http_purge_valid_post_statuses', $valid_post_status, $post_id ); -
vhp_max_post_pages_to_purge
filter/** * Filters how many numbered pages of a post are purged individually. */ apply_filters( 'vhp_max_post_pages_to_purge', 100, $post_id ); -
/** * Fires after an async purge queue run has completed. */ do_action( 'vhp_purge_queue_after_process', $queue, $summary ); -
vhp_purge_queue_before_save
filter/** * Filter the async purge queue before it is persisted. */ apply_filters( 'vhp_purge_queue_before_save', $queue ); -
/** * Filter the watchdog staleness threshold (in seconds). */ apply_filters( 'vhp_purge_queue_watchdog_seconds', 5 * MINUTE_IN_SECONDS ); -
vhp_purge_tags
filter/** * Allow filtering of tags prior to batching and purging. */ apply_filters( 'vhp_purge_tags', $tags ); -
vhp_purge_tags_for_post
filter/** * Filter the tags to purge for a post. */ apply_filters( 'vhp_purge_tags_for_post', $tags, $post_id, $post ); -
/** * Maximum length (in bytes) of the header value used for tag patterns. * Defaults to 7680 bytes, which is a safe value below common Varnish and HTTP * header limits, and helps avoid oversized BAN expressions. */ apply_filters( 'vhp_purge_tags_max_header_size', 7680 ); -
vhp_purge_tags_skipped_nginx
action/** * Fires when tag-based purging is skipped because the backend is NGINX. */ do_action( 'vhp_purge_tags_skipped_nginx', $tags ); -
vhp_purgeme_path
filter/** * Filter the purge path */ apply_filters( 'vhp_purgeme_path', $purgeme, $schema, $one_host, $path, $pregex, $p ); -
vhp_varnish_ip
filterapply_filters( 'vhp_varnish_ip', $varniship[ $i ] ); -
varnish_http_purge_schema
filterapply_filters( 'varnish_http_purge_schema', $schema_type ); -
vhp_debug_check_url
filterapply_filters( 'vhp_debug_check_url', $url ); -
after_full_purge
actiondo_action( 'after_full_purge' ); -
after_purge_url
actiondo_action( 'after_purge_url', $parsed_url, $purgeme, $response, $headers ); -
varnish_http_purge_events
filterapply_filters( 'varnish_http_purge_events', $actions ); -
apply_filters( 'varnish_http_purge_x_varnish_header_name', 'X-Varnish' ); -
vhp_cache_tags
filterapply_filters( 'vhp_cache_tags', $tags ); -
vhp_cache_tags_header
filterapply_filters( 'vhp_cache_tags_header', 'X-Cache-Tags' ); -
vhp_debug_cache_check_delay
filterapply_filters( 'vhp_debug_cache_check_delay', 2 ); -
vhp_home_url
filterapply_filters( 'vhp_home_url', home_url() ); -
vhp_manual_purge_capability
filterapply_filters( 'vhp_manual_purge_capability', 'edit_published_posts' ); -
apply_filters( 'vhp_purge_queue_health_max_age', 15 * MINUTE_IN_SECONDS ); -
apply_filters( 'vhp_purge_queue_health_max_items', 500 ); -
vhp_purge_queue_max_age
filterapply_filters( 'vhp_purge_queue_max_age', self::PURGE_QUEUE_MAX_AGE ); -
vhp_purge_queue_max_tags
filterapply_filters( 'vhp_purge_queue_max_tags', self::PURGE_QUEUE_MAX_TAGS ); -
vhp_purge_queue_max_urls
filterapply_filters( 'vhp_purge_queue_max_urls', self::PURGE_QUEUE_MAX_URLS ); -
apply_filters( 'vhp_purge_queue_max_urls_per_run', 200 ); -
vhp_purge_urls
filterapply_filters( 'vhp_purge_urls', $this->purge_urls, $post_id );
Generated from Proxy Cache Purge'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: