• Resolved hassantafreshi

    (@hassantafreshi)


    As the developer of the?Easy Form Builder plugin, I’m seeking some advice about potential conflicts with 10Web Booster.

    Here is the function I am currently using for internal caching:

    public function get_efbFunction($state) { 
    if (isset($this->efbFunction)) return $this->efbFunction;
    $efbFunctionInstance;
    if (false === ($efbFunctionInstance = wp_cache_get('efbFunctionInstance', 'emsfb'))) {
    if (!class_exists('Emsfb\efbFunction')) {
    require_once(EMSFB_PLUGIN_DIRECTORY . 'includes/functions.php');
    }
    $efbFunctionInstance = new \Emsfb\efbFunction();
    wp_cache_set('efbFunctionInstance', $efbFunctionInstance, 'emsfb', 3600); // 1 hour cache
    }
    $this->efbFunction = $efbFunctionInstance;
    if ($state == 1) return $this->efbFunction;
    }

    My concern is whether using?wp_cache_get?and?wp_cache_set?for internal caching might cause any conflicts with 10Web Booster. Has anyone had similar experiences or know of best practices to ensure they work together smoothly?

    Any guidance or insights would be greatly appreciated.

    Thank you for your help!

    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 Mane Grigoryan

    (@manegr)

    Hi @hassantafreshi ,
    Thank you for reaching out with your question regarding the potential conflicts between the Easy Form Builder plugin and 10Web Booster.

    10Web Booster provides only page caching. If a page is cached, it will be served from the cache, and no PHP code from other plugins will execute on that cached page. However, your use of wp_cache_get and wp_cache_set for internal caching is fine and should not interfere with 10Web Booster. This is because 10Web Booster does not provide an object cache shared between requests, so the only concern is the page cache.

    I hope this helps! If you have any further questions, feel free to ask.
    Regards, Mane

    Thread Starter hassantafreshi

    (@hassantafreshi)

    Thank you for the quick response. We use the following function to handle page caching with plugins. Do you have a structure similar to other plugins that we can add to solve the caching issue?

    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')){

    ? ? ? ? ? ? //wp-rocket done ? ? ? ? ? ? ? ? ? ?

    ? ? ? ? ? ? $r = rocket_clean_post($page_id); ? ? ? ? ?

    ? ? ? ? }elseif (function_exists('wp_cache_post_change')){

    ? ? ? ? ? ? //WP Super Cache done ? ? ? ? ?

    ? ? ? ? ? ? //Jetpack done

    ? ? ? ? ? ? $GLOBALS['super_cache_enabled']=1;

    ? ? ? ? ? ? wp_cache_post_change($page_id);

    ? ? ? ? }elseif(function_exists('autoptimize_filter_js_noptimize ')){

    ? ? ? ? ? ? //auto-Optimize done

    ? ? ? ? ? ? autoptimize_filter_js_exclude(['jquery.min-efb.js','core-efb.js']);

    ? ? ? ? ? ? autoptimize_filter_js_noptimize();

    ? ? ? ? }elseif(class_exists('WPO_Page_Cache')){

    ? ? ? ? ? ? //WP-Optimize done

    ? ? ? ? ? ? \WPO_Page_Cache::delete_single_post_cache($page_id);

    ? ? ? ? }elseif(function_exists('w3tc_flush_post')){

    ? ? ? ? ? ? //W3 Total Cache done ? ? ? ? ?

    ? ? ? ? ? ? w3tc_flush_post($page_id);

    ? ? ? ? }elseif(function_exists('wpfc_clear_post_cache_by_id')){

    ? ? ? ? ? ? //WP Fastest Cache done

    ? ? ? ? ? ? wpfc_clear_post_cache_by_id($page_id);

    ? ? ? ? }elseif(has_action('wphb_clear_page_cache')){

    ? ? ? ? ? ? //Hummingbird done ? ? ? ? ?

    ? ? ? ? ? ? do_action( 'wphb_clear_page_cache', $page_id );

    ? ? ? ? }

    ? ? }

    Click here for get full source code on GitHub.

    Thank you.

    Plugin Support Mane Grigoryan

    (@manegr)

    Dear @hassantafreshi ,
    Thanks for your message.

    You can clear the cache by calling?do_action('two_clear_cache');?or \TenWebOptimizer\OptimizerAdmin::clear_cache(false, true);

    Please, let us know in case you have more questions.
    Regards, Mane

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