Quantcast
Channel: WordPress.org Forums » [Redis Object Cache] Support
Viewing all articles
Browse latest Browse all 111

Custom Caching Code Compatibility with Redis Object Cache

$
0
0

Replies: 0

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!


Viewing all articles
Browse latest Browse all 111

Trending Articles