• Resolved hassantafreshi

    (@hassantafreshi)


    Hi,
    I have been working with the?Easy Form Builder plugin?and encountered some challenges with page caching. To address these issues, we use the following function to handle other page caching plugins with 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')) $r = rocket_clean_post($page_id);
    break;
    .
    .
    .

    }
    }

    }

    However, we’re seeking a more integrated solution. Specifically, we’re looking for a structure or method similar to what other plugins use to manage caching effectively.

    Thank you in advance for your help and insights!

    Best regards

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support SpeedyCache

    (@speedycache)

    Hello,

    We apologies for the delay in response.
    You can try using \SpeedyCache\Delete::single_cache(false, $post_id); this will delete cache of that specific page and homepage and any page where the current page is linked to.

    You can check this code at speedycache/main/delete.php
    We are going to release a new version of SpeedyCache which has some major changes, so we suggest you wait for one week as we will be releasing that version by Mid of this week.

    Regards,
    SpeedyCache Team

    Thread Starter hassantafreshi

    (@hassantafreshi)

    @speedycache Thank you for your response. We will wait for your next update. Please remember to share the caching function with us after the plugin is updated.

    Plugin Support SpeedyCache

    (@speedycache)

    Hello,

    We are apologies for the delay, we have release a version 1.2.0 and from this version you can use \SpeedyCache\Delete::cache($page_id); to delete cache of a single page, do let us know if you face any issue with this.

    Regards,
    SpeedyCache Team

    Thread Starter hassantafreshi

    (@hassantafreshi)

    Thank you for your response. We have added this code to the Easy Form Builder plugin for compatibility with your caching plugin. What do you think?

    case 'speedycache':
    //check slug of plugin caches
    if(class_exists('SpeedyCache\Delete')) \SpeedyCache\Delete::cache($page_id);
    break;

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Managing Page Caching in a Different Plugin’ is closed to new replies.