• Resolved hassantafreshi

    (@hassantafreshi)


    As the developer of the Easy Form Builder plugin, I’m seeking advice on potential conflicts with Auto-Optimize.

    Here’s the function I’m 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;
    }

    I’m concerned that using wp_cache_get and wp_cache_set for internal caching might cause conflicts with Auto-Optimize. Has anyone encountered similar issues or know of best practices to ensure compatibility?

    Any guidance or insights would be greatly appreciated.

    Thank you for your help!

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

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

    (@vupdraft)

    These are WordPress functions which I suspect would be used by every caching plugin. We would recommend that you don’t use more than one plugin to do your caching. The only exception to this would be if you had a plugin to do your object cache such as Redis or Varnish.

    Thread Starter hassantafreshi

    (@hassantafreshi)

    Thank you for your response. Why should I not use these two functions?

    Plugin Support wpmansour

    (@wpmansour)

    Using wp_cache_get and wp_cache_set for internal caching generally shouldn’t cause conflicts with WP-Optimize.

    The wp_cache_set functions are used for object caching, which helps reduce HTML page generation time by storing resource-intensive results, such as complex database query results. On the other hand, WP-Optimize is a file caching plugin that saves the generated HTML page and avoids regenerating it for every request.

    If you are specifically referring to potential conflicts with Auto-Optimize, it might be best to post in their support channels to get more targeted advice for that plugin.

    Thread Starter hassantafreshi

    (@hassantafreshi)

    Thank you for your explanation. We have not conducted any tests yet and are sending this message to consider various possibilities with the development version. We want to understand how it might potentially conflict with your plugin.

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