• Resolved hassantafreshi

    (@hassantafreshi)


    Hi,
    We 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 page caching with our plugins:

    public function cache_cleaner_Efb($page_id){

    if (defined('LSCWP_V') || defined('LSCWP_BASENAME' )){

    //litespeed done

    do_action( 'litespeed_purge_post', $page_id );

    }else if (function_exists('rocket_clean_post')){

    ...

    }

    Click here to get the full source code on GitHub.

    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 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Plamen M

    (@plamenm)

    Hello @hassantafreshi ,

    If I understand your request correctly, you are looking for a way for the cached content to be flushed upon changes through the Easy Form Builder plugin. When you are adding a form to a post or a page, the cache is being automatically flushed upon publishing the changes. Another way is to flush the cache manually through the Purge SG Cache button. A third option is to use one of the custom filters. You can check some examples here and adjust them to your needs:

    https://eu.siteground.com/tutorials/wordpress/speed-optimizer/custom-filters/

    Regards,
    Plamen.M
    Tech Support Team
    SiteGround.com

    Thread Starter hassantafreshi

    (@hassantafreshi)

    Yes, exactly, I mean temporarily excluding a page from the cache. However, the structure we have established with other caching plugins is that we pass the page ID to the filter of each plugin to perform this action. In the link you sent as a guide, I couldn’t find a function with these specifications. I would appreciate it if you could guide me so that users don’t encounter any issues.

    Thank you.

    Plugin Support Preslav Kenanov

    (@preslavkenanov)

    Hello @hassantafreshi,

    With the current filters we have for cache management, it is not possible to exclude a page based on its ID. However, you can still disable the Dynamic Cache for a particular page with htaccess rules and more information about this is available here:

    https://eu.siteground.com/kb/disable-dynamic-caching-website/#Exclude_a_single_page_from_the_cache

    However, I do not believe that this is the solution you are looking for. As such, I can also suggest taking a look at the Plugin Compatibility paragraph in our article about the different cache management filters of the Speed Optimizer plugin here:

    https://eu.siteground.com/tutorials/wordpress/speed-optimizer/custom-filters/#Plugin_Compatibility

    You can use these filters to purge the cache for specific URLs of the website.

    Kind Regards,

    Preslav Kenanov

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.