initialized = true; } else { $this->xpdo->log(xPDO::LOG_LEVEL_ERROR, "xPDOWinCache[{$this->key}]: Error creating wincache provider; xPDOWinCache requires the PHP wincache extension, version 1.1.0 or later."); } } public function add($key, $var, $expire= 0, $options= array()) { $added= wincache_ucache_add( $this->getCacheKey($key), $var, $expire ); return $added; } public function set($key, $var, $expire= 0, $options= array()) { $set= wincache_ucache_set( $this->getCacheKey($key), $var, $expire ); return $set; } public function replace($key, $var, $expire= 0, $options= array()) { $replaced = false; if (wincache_ucache_exists($key)) { $replaced= wincache_ucache_set( $this->getCacheKey($key), $var, $expire ); } return $replaced; } public function delete($key, $options= array()) { $deleted = false; if (!isset($options['multiple_object_delete']) || empty($options['multiple_object_delete'])) { $deleted= wincache_ucache_delete($this->getCacheKey($key)); } else { $deleted= $this->flush($options); } return $deleted; } public function get($key, $options= array()) { $value= wincache_ucache_get($this->getCacheKey($key)); return $value; } public function flush($options= array()) { return wincache_ucache_clear(); } }