Handling Page Caching
-
Hi,
I’ve been working with the Easy Form Builder plugin and have encountered some issues with page caching. To manage this, we created a function to handle different caching plugins alongside Easy Form Builder:
public function cache_cleaner_Efb($page_id, $plugins) {
$page_id = intval($page_id);
$cache_plugins = json_decode($plugins);
foreach ($cache_plugins as $plugin) {
switch ($plugin->slug) {
case 'litespeed-cache':
if (defined('LSCWP_V') || defined('LSCWP_BASENAME')) {
do_action('litespeed_purge_post', $page_id);
}
break;
case 'wp-rocket':
if (function_exists('rocket_clean_post')) {
rocket_clean_post($page_id);
}
break;
// Additional cases for other plugins can be added here
}
}
}However, we are now aiming for a more cohesive solution. Ideally, we want an approach similar to how other plugins handle caching for better compatibility.
Any advice or recommendations would be highly appreciated.
Best regards,
The page I need help with: [log in to see the link]
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- You must be logged in to reply to this topic.