Page caches
A page cache keeps serving pages built before the search was placed. PXL Search clears the ones it knows, and gives you a hook for your own.
Why it matters#
A cached page is a copy built earlier. If PXL Search was added, moved or restyled since, the copy still shows the old page, and shoppers may see an empty spot where the search should be. So PXL Search clears your page cache for you.
When it clears#
- Once after each plugin update (the first request after it).
- When you save the search settings.
- When you turn PXL Search on or off.
What it knows#
LiteSpeed Cache, WP Rocket, W3 Total Cache, WP Super Cache, SiteGround, WP Fastest Cache, Autoptimize, Breeze, Hummingbird, Nginx Helper and WP-Optimize. A cache plugin that is not installed is skipped.
Not on the list, or a cache at your host or CDN? Clear it by hand after you change the search settings, or use the hook below.
Hook your own cache#
After the known caches are cleared, PXL Search runs the action pxlchat_purge_page_caches. It passes a list of the caches it cleared. Hook in your own clearing there, for example in your theme's functions.php or a small plugin.
// runs after every PXL Search page-cache purge add_action( 'pxlchat_purge_page_caches', function ( $cleared ) { // $cleared lists what was cleared, e.g. ['wp-rocket'] my_host_purge_everything(); // your own call } );