public function remove($key) { if ($key == 'all') { return wincache_ucache_clear() ? true : false; } else { if (wincache_ucache_exists($this->type . '_' . $key)) { return wincache_ucache_delete($this->type . '_' . $key) ? true : false; } return false; } return false; }
function cs_cache_clear() { wincache_ucache_clear(); $unicode = extension_loaded('unicode') ? 1 : 0; $where = "options_mod = 'clansphere' AND options_name = 'cache_unicode'"; cs_sql_update(__FILE__, 'options', array('options_value'), array($unicode), 0, $where); }
public function tearDown() { if (function_exists('wincache_ucache_clear')) { wincache_ucache_clear(); } parent::tearDown(); }
/** * @return string */ private static function clearUserCache() { if (function_exists('apc_clear_cache') && function_exists('opcache_reset') && apc_clear_cache()) { return 'APC User Cache: success.'; } if (function_exists('apc_clear_cache') && apc_clear_cache('user')) { return 'APC User Cache: success.'; } if (function_exists('wincache_ucache_clear') && wincache_ucache_clear()) { return 'Wincache User Cache: success.'; } throw new \RuntimeException('User Cache: failure.'); }
/** * {@inheritDoc} */ public function flush($namespace = null) { if (!$namespace) { return wincache_ucache_clear(); } else { $namespace = implode($this->getNamespaceDelimiter(), (array) $namespace); $info = wincache_ucache_info(false); // iterate over all entries and delete matching foreach ($info['ucache_entries'] as $entry) { $key = $entry['key_name']; if (0 === strpos($key, $namespace)) { wincache_ucache_delete($key); } } } return true; }
/** * キャッシュを削除する. * * doctrine, profiler, twig によって生成されたキャッシュディレクトリを削除する. * キャッシュは $app['config']['root_dir'].'/app/cache' に生成されます. * * @param Application $app * @param boolean $isAll .gitkeep を残してすべてのファイル・ディレクトリを削除する場合 true, 各ディレクトリのみを削除する場合 false * @param boolean $isTwig Twigキャッシュファイルのみ削除する場合 true * @return boolean 削除に成功した場合 true */ public static function clear($app, $isAll, $isTwig = false) { $cacheDir = $app['config']['root_dir'] . '/app/cache'; $filesystem = new Filesystem(); if ($isAll) { $finder = Finder::create()->in($cacheDir)->notName('.gitkeep'); $filesystem->remove($finder); } elseif ($isTwig) { if (is_dir($cacheDir . '/twig')) { $finder = Finder::create()->in($cacheDir . '/twig'); $filesystem->remove($finder); } } else { if (is_dir($cacheDir . '/doctrine')) { $finder = Finder::create()->in($cacheDir . '/doctrine'); $filesystem->remove($finder); } if (is_dir($cacheDir . '/profiler')) { $finder = Finder::create()->in($cacheDir . '/profiler'); $filesystem->remove($finder); } if (is_dir($cacheDir . '/twig')) { $finder = Finder::create()->in($cacheDir . '/twig'); $filesystem->remove($finder); } if (is_dir($cacheDir . '/translator')) { $finder = Finder::create()->in($cacheDir . '/translator'); $filesystem->remove($finder); } } if (function_exists('opcache_reset')) { opcache_reset(); } if (function_exists('apc_clear_cache')) { apc_clear_cache('user'); apc_clear_cache(); } if (function_exists('wincache_ucache_clear')) { wincache_ucache_clear(); } return true; }
/** * @see SugarCacheAbstract::_resetExternal() */ protected function _resetExternal() { wincache_ucache_clear(); }
public function resetCache() { wincache_ucache_clear(); }
/** * Internal method to clear items off all namespaces. * * Options: * - ttl <float> * - The time-to-life * * @param int $normalizedMode Matching mode (Value of Adapter::MATCH_*) * @param array $normalizedOptions * @return boolean * @throws Exception * @see clearByNamespace() */ protected function internalClear(&$normalizedMode, array &$normalizedOptions) { return wincache_ucache_clear(); }
/** * Remove all items from the cache. * * @return void */ public function flush() { wincache_ucache_clear(); }
/** * Delete all cache entries. * * Beware of using this method when * using shared memory cache systems, as it will wipe every * entry within the system for all clients. * * // Delete all cache entries in the wincache group * Cache::instance('wincache')->delete_all(); * * @return boolean */ public function delete_all() { return wincache_ucache_clear(); }
public function flush($options= array()) { return wincache_ucache_clear(); }
/** * @see wincache_ucache_clear(); */ public function clear() { $result = wincache_ucache_clear(); $this->clearInfoArrays(); return $result; }
/** * Remove all keys and value from cache */ public function clean() { wincache_ucache_clear(); return true; }
function clear() { wincache_ucache_clear(); }
/** * Remove all items from the cache. * * @return void */ protected function flushItems() { wincache_ucache_clear(); }
function driver_clean($option = array()) { wincache_ucache_clear(); return true; }
/** * @return bool */ protected function driverClear() { return wincache_ucache_clear(); }
{ $orgi = $name; $name = self::getMemoryName($name); if ($skip_if_existing == false) { return wincache_ucache_set($name, $value, $time_in_second);
/** * 清除缓存 * @access public * @param string $tag 标签名 * @return boolean */ public function clear($tag = null) { if ($tag) { $keys = $this->getTagItem($tag); foreach ($keys as $key) { wincache_ucache_delete($key); } $this->rm('tag_' . md5($tag)); return true; } else { return wincache_ucache_clear(); } }
/** * Deletes all values from cache. * This is the implementation of the method declared in the parent class. * @return boolean whether the flush operation was successful. * @since 1.1.5 */ protected function flushValues() { return wincache_ucache_clear(); }
public function clean() { if (function_exists('wincache_ucache_clear')) { return wincache_ucache_clear(); } else { return getMessage('Cache', 'unsupported', 'Wincache'); } }
function flush() { return wincache_ucache_clear(); }
/** * 删除全部 * * @return boolean */ public function delete_all() { if (IS_DEBUG) { Core::debug()->info('wincache delete all cache'); } return wincache_ucache_clear(); }
/** * Clean some cache records * * Available modes are : * 'all' (default) => remove all cache entries ($tags is not used) * 'old' => unsupported * 'matchingTag' => unsupported * 'notMatchingTag' => unsupported * 'matchingAnyTag' => unsupported * * @param string $mode clean mode * @param array $tags array of tags * @throws IfwPsn_Vendor_Zend_Cache_Exception * @return boolean true if no problem */ public function clean($mode = IfwPsn_Vendor_Zend_Cache::CLEANING_MODE_ALL, $tags = array()) { switch ($mode) { case IfwPsn_Vendor_Zend_Cache::CLEANING_MODE_ALL: return wincache_ucache_clear(); break; case IfwPsn_Vendor_Zend_Cache::CLEANING_MODE_OLD: $this->_log("IfwPsn_Vendor_Zend_Cache_Backend_WinCache::clean() : CLEANING_MODE_OLD is unsupported by the WinCache backend"); break; case IfwPsn_Vendor_Zend_Cache::CLEANING_MODE_MATCHING_TAG: case IfwPsn_Vendor_Zend_Cache::CLEANING_MODE_NOT_MATCHING_TAG: case IfwPsn_Vendor_Zend_Cache::CLEANING_MODE_MATCHING_ANY_TAG: $this->_log(self::TAGS_UNSUPPORTED_BY_CLEAN_OF_WINCACHE_BACKEND); break; default: IfwPsn_Vendor_Zend_Cache::throwException('Invalid mode for clean() method'); break; } }
} if ($cache_data == SUMMARY_DATA || $cache_data == RCACHE_DATA) { $rpcache_mem_info = wincache_rplist_meminfo(); $rpcache_file_info = wincache_rplist_fileinfo(); } if ($user_cache_available && ($cache_data == SUMMARY_DATA || $cache_data == UCACHE_DATA)) { $ucache_mem_info = wincache_ucache_meminfo(); $ucache_info = wincache_ucache_info(); } if ($session_cache_available && ($cache_data == SUMMARY_DATA || $cache_data == SCACHE_DATA)) { $scache_mem_info = wincache_scache_meminfo(); $scache_info = wincache_scache_info(); } } if (USE_AUTHENTICATION && $user_cache_available && $clear_user_cache) { wincache_ucache_clear(); header('Location: ' . $PHP_SELF . '?page=' . UCACHE_DATA); exit; } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <style type="text/css"> body { background-color: #ffffff; color: #000000; font-family: sans-serif; font-size: 0.8em; }
/** * {@inheritdoc} */ public function clear() { return wincache_ucache_clear(); }
/** * {@inheritDoc} */ function purge() { wincache_ucache_clear(); parent::purge(); }
/** * {@inheritdoc} */ protected function doFlush() { return wincache_ucache_clear(); }
/** * Clear items off all namespaces. * * Options: * - ttl <float> optional * - The time-to-life (Default: ttl of object) * - tags <array> optional * - Tags to search for used with matching modes of * Zend\Cache\Storage\Adapter::MATCH_TAGS_* * * @param int $mode Matching mode (Value of Zend\Cache\Storage\Adapter::MATCH_*) * @param array $options * @return boolean * @throws Exception * @see clearByNamespace() * * @triggers clear.pre(PreEvent) * @triggers clear.post(PostEvent) * @triggers clear.exception(ExceptionEvent) */ public function clear($mode = self::MATCH_EXPIRED, array $options = array()) { if (!$this->getOptions()->getWritable()) { return false; } $this->normalizeOptions($options); $this->normalizeMatchingMode($mode, self::MATCH_EXPIRED, $options); $args = new ArrayObject(array('mode' => &$mode, 'options' => &$options)); try { $eventRs = $this->triggerPre(__FUNCTION__, $args); if ($eventRs->stopped()) { return $eventRs->last(); } $result = wincache_ucache_clear(); return $this->triggerPost(__FUNCTION__, $args, $result); } catch (\Exception $e) { return $this->triggerException(__FUNCTION__, $args, $e); } }