本文整理汇总了PHP中wincache_ucache_clear函数的典型用法代码示例。如果您正苦于以下问题:PHP wincache_ucache_clear函数的具体用法?PHP wincache_ucache_clear怎么用?PHP wincache_ucache_clear使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了wincache_ucache_clear函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: remove
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;
}
示例2: cs_cache_clear
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);
}
示例3: tearDown
public function tearDown()
{
if (function_exists('wincache_ucache_clear')) {
wincache_ucache_clear();
}
parent::tearDown();
}
示例4: clearUserCache
/**
* @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.');
}
示例5: flush
/**
* {@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;
}
示例6: clear
/**
* キャッシュを削除する.
*
* 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;
}
示例7: _resetExternal
/**
* @see SugarCacheAbstract::_resetExternal()
*/
protected function _resetExternal()
{
wincache_ucache_clear();
}
示例8: resetCache
public function resetCache()
{
wincache_ucache_clear();
}
示例9: internalClear
/**
* 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();
}
示例10: flush
/**
* Remove all items from the cache.
*
* @return void
*/
public function flush()
{
wincache_ucache_clear();
}
示例11: delete_all
/**
* 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();
}
示例12: flush
public function flush($options= array()) {
return wincache_ucache_clear();
}
示例13: clear
/**
* @see wincache_ucache_clear();
*/
public function clear()
{
$result = wincache_ucache_clear();
$this->clearInfoArrays();
return $result;
}
示例14: clean
/**
* Remove all keys and value from cache
*/
public function clean()
{
wincache_ucache_clear();
return true;
}
示例15: clear
function clear()
{
wincache_ucache_clear();
}