WP Super Cache 3.1.5 has 6 actions and 36 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 WP Super Cache fires an action
add_action( 'wpsc_after_delete_cache_admin_bar', function( $req_path, $referer ) {
// Your code runs here.
}, 10, 2 );
// Change a value WP Super Cache is about to use
add_filter( 'wpsc_disable_cache_on_wp_die', 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
-
/** * Hook into the cache deletion process after a successful cache deletion from * the admin bar button. */ do_action( 'wpsc_after_delete_cache_admin_bar', $req_path, $referer ); -
wpsc_disable_cache_on_wp_die
filter/** * Filters whether to disable caching when wp_die() is invoked. */ apply_filters( 'wpsc_disable_cache_on_wp_die', true ); -
gc_cache
actiondo_action( 'gc_cache', 'prune', $permalink ); -
wp_cache_cleared
actiondo_action( 'wp_cache_cleared' ); -
wp_cache_preload_taxonomies
filterapply_filters( 'wp_cache_preload_taxonomies', array( 'post_tag' => 'tag', 'category' => 'category', ) ); -
apply_filters( 'wp_super_cache_clear_post_cache', true, $post ); -
do_createsupercache
filterapply_filters( 'do_createsupercache', $user_info ); -
ossdl_off_blog_url
filterapply_filters( 'ossdl_off_blog_url', $ossdl_off_blog_url ); -
wpsc_enable_wp_config_edit
filterapply_filters( 'wpsc_enable_wp_config_edit', true ); -
all_supercache_filenames
filterapply_filters( 'all_supercache_filenames', $filenames ); -
cached_mobile_browsers
filterapply_filters( 'cached_mobile_browsers', $wp_cache_mobile_browsers ); -
cached_mobile_groups
filterapply_filters( 'cached_mobile_groups', array() ); -
cached_mobile_prefixes
filterapply_filters( 'cached_mobile_prefixes', $wp_cache_mobile_prefixes ); -
got_rewrite
filterapply_filters( 'got_rewrite', $got_rewrite ); -
jb_cache_moved_to_wpsc
actiondo_action( 'jb_cache_moved_to_wpsc' ); -
supercache_dir
filterapply_filters( 'supercache_dir', $dir ); -
supercache_filename_str
filterapply_filters( 'supercache_filename_str', $extra_str ); -
supercacherewriteconditions
filterapply_filters( 'supercacherewriteconditions', $condition_rules ); -
supercacherewriterules
filterapply_filters( 'supercacherewriterules', $rules ); -
wp_cache_eof_tags
filterapply_filters( 'wp_cache_eof_tags', '/(<\/html>|<\/rss>|<\/feed>|<\/urlset|<\?xml)/i' ); -
wp_cache_gc
actiondo_action( 'wp_cache_gc' ); -
wp_cache_meta
filterapply_filters( 'wp_cache_meta', $wp_cache_meta ); -
wp_cache_ob_callback_filter
filterapply_filters( 'wp_cache_ob_callback_filter', $buffer ); -
apply_filters( 'wp_super_cache_error_checking', true ); -
wp_super_cache_supercachedir
filterapply_filters( 'wp_super_cache_supercachedir', $cache_path . 'supercache/' . trailingslashit( strtolower( preg_replace( '/:.*$/', '', str_replace( 'http://', '', str_replace( 'https://', '', $home ) ) ) ) ) ); -
wpsc_accept_headers
filterapply_filters( 'wpsc_accept_headers', array( 'application/json', 'application/activity+json', 'application/ld+json' ) ); -
wpsc_cache_state
filterapply_filters( 'wpsc_cache_state', array( 'expired', 'cached' ) ); -
wpsc_cache_types
filterapply_filters( 'wpsc_cache_types', array( 'supercache', 'wpcache' ) ); -
wpsc_cdn_urls
filterapply_filters( 'wpsc_cdn_urls', $ossdl_arr_of_cnames ); -
wpsc_created_advanced_cache
actiondo_action( 'wpsc_created_advanced_cache' ); -
wpsc_htaccess_mod_expires
filterapply_filters( 'wpsc_htaccess_mod_expires', $expires_rules ); -
wpsc_htaccess_mod_headers
filterapply_filters( 'wpsc_htaccess_mod_headers', $headers ); -
wpsc_known_headers
filterapply_filters( 'wpsc_known_headers', $known_headers ); -
apply_filters( 'wpsc_minimum_preload_interval', 10 ); -
wpsc_only_cache_known_pages
filterapply_filters( 'wpsc_only_cache_known_pages', 1 ); -
wpsc_preload_post_types
filterapply_filters( 'wpsc_preload_post_types', get_post_types( $preload_type_args, 'names', 'or' ) ); -
wpsc_preload_post_types_args
filterapply_filters( 'wpsc_preload_post_types_args', array( 'public' => true, 'publicly_queryable' => true ) ); -
wpsc_protected_directories
filterapply_filters( 'wpsc_protected_directories', array( $cache_path . '.htaccess', $cache_path . 'index.html', $blog_cache_dir, $blog_cache_dir . 'index.html', $blog_cache_dir . 'meta', $blog_cache_dir . 'meta/index.html', $cache_path . 'supercache/index.html', $cache_path . 'supercache', ) ); -
wpsc_send_uninstall_errors
filterapply_filters( 'wpsc_send_uninstall_errors', 1 ); -
wpsupercache_404
filterapply_filters( 'wpsupercache_404', false ); -
wpsupercache_buffer
filterapply_filters( 'wpsupercache_buffer', $buffer );
Generated from WP Super 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: