• Resolved hassantafreshi

    (@hassantafreshi)


    I’m Hassan Tafreshi, a developer for the Easy Form Builder plugin. I have a query about possible conflicts with Redis Object Cache.

    Below is the function I’m concerned about:

    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 am using wp_cache_get and wp_cache_set for internal caching. My concern is that this might conflict with Redis Object Cache.

    Has anyone experienced issues with this kind of setup? Are there any best practices or specific configurations within Redis Object Cache to avoid conflicts? Any advice or insights would be greatly appreciated.

    Thank you in advance for your assistance!

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

Viewing 1 replies (of 1 total)
  • Plugin Author Till Krüss

    (@tillkruess)

    using wp_cache_get() will always use Redis if Redis Object Cache is installed. There should be no conflicts, you can use these methods.

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