initialized = false; return; } parent::init(); } function get($key) { $value = parent::get($key); if (!is_null($value)) { return $value; } if (EXTERNAL_CACHE_DEBUG) { SugarCache::log('grabbing via wincache_ucache_get(' . $this->_realKey($key) . ')'); } return $this->_processGet( $key, wincache_ucache_get( $this->_realKey($key) ) ); } function set($key, $value) { parent::set($key, $value); // caching is turned off if(!$GLOBALS['external_cache_enabled']) { return; } $external_key = $this->_realKey($key); if (EXTERNAL_CACHE_DEBUG) { SugarCache::log("Step 3: Converting key ($key) to external key ($external_key)"); } wincache_ucache_set($external_key, $value, $this->timeout); if (EXTERNAL_CACHE_DEBUG) { SugarCache::log("Step 4: Added key to Wincache cache {$external_key} with value ($value) to be stored for ".EXTERNAL_CACHE_INTERVAL_SECONDS." seconds"); } } function __unset($key) { parent::__unset($key); wincache_ucache_delete($this->_realKey($key)); } /** * Clean opcode cache */ function clean_opcodes() { wincache_refresh_if_changed(); } }