Skip caching a page
Return a short reason to keep a page out of the cache. It shows as BYPASS: reason in the header.
add_filter( 'softminal_cache_bypass', function ( $reason ) {
if ( is_page( 'live-scores' ) ) {
return 'live-scores';
}
return $reason;
} );
Filters
| Filter | Use |
|---|---|
softminal_cache_bypass | Return a reason string to skip caching the current page. |
softminal_cache_host_cache | Return the name of a host cache, so Softminal Cache keeps its page cache off. |
softminal_cache_harmless_cookies | Cookies a page may set and still be cached (default: language cookies). |
softminal_cache_rewrite | Return false to turn off HTML optimisation for a request. |
softminal_cache_server_software | Override the detected server: apache, nginx or other. |
softminal_cache_htaccess_file | Path of the .htaccess file to write to. |
Actions
| Action | When |
|---|---|
softminal_cache_purged_all | After the whole cache is cleared. |
softminal_cache_purged_url | After one address is cleared. Gets the URL. |
softminal_cache_register_passes | Add your own HTML optimisation pass. Gets the rewriter. |
softminal_cache_pass_failed | An HTML pass failed and was rolled back. Gets the pass id and the error. |
Any plugin can also define DONOTCACHEPAGE to keep a page out of the cache.