public function getFollowUpSequences() { /* * Cache busting */ if (function_exists('wp_using_ext_object_cache')) { $extCache = wp_using_ext_object_cache(); if (true === $extCache) { wp_using_ext_object_cache(false); } } /* * Cache key consist of an hour value on purpose to be sure that cache will be invalidated every hour. * This is due to some plugins deleting _transient_timeout_* option and leaving _transient_* which makes it valid everytime. It won't expire. */ $cacheKey = md5($this->cachePrefix . '_' . __FUNCTION__ . date('H')); if (false === ($data = get_transient($cacheKey))) { $data = $this->provider->getFollowUpSequences(); uasort($data['lists'], array($this, 'sort')); set_transient($cacheKey, $data, self::CACHE_EXPIRY_TIME); } /* * Cache busting */ if (function_exists('wp_using_ext_object_cache')) { wp_using_ext_object_cache($extCache); } return $data; }
public function getFollowUpSequences() { $cacheKey = md5($this->cachePrefix . '_' . __FUNCTION__); if (false === ($data = get_transient($cacheKey))) { $data = $this->provider->getFollowUpSequences(); uasort($data['lists'], array($this, 'sort')); set_transient($cacheKey, $data, self::CACHE_EXPIRY_TIME); } return $data; }
/** * @see OptimizePress_Modules_Email_ProviderInterface::register() */ public function register($list, $email, $fname, $lname) { return $this->provider->register($list, $email, $fname, $lname); }