コード例 #1
1
ファイル: WinCache.php プロジェクト: blanc0/cecilia
 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
0
ファイル: wincache.php プロジェクト: aberrios/WEBTHESGO
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
0
ファイル: WinCacheTest.php プロジェクト: rajanlamic/IntTest
 public function tearDown()
 {
     if (function_exists('wincache_ucache_clear')) {
         wincache_ucache_clear();
     }
     parent::tearDown();
 }
コード例 #4
0
 /**
  * @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
0
ファイル: WincacheCache.php プロジェクト: Nyholm/acache
 /**
  * {@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
0
ファイル: Cache.php プロジェクト: ec-cube/ec-cube
 /**
  * キャッシュを削除する.
  *
  * 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
0
 /**
  * @see SugarCacheAbstract::_resetExternal()
  */
 protected function _resetExternal()
 {
     wincache_ucache_clear();
 }
コード例 #8
0
 public function resetCache()
 {
     wincache_ucache_clear();
 }
コード例 #9
0
ファイル: WinCache.php プロジェクト: bradley-holt/zf2
 /**
  * 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
0
ファイル: WinCacheStore.php プロジェクト: Thomvh/turbine
 /**
  * Remove all items from the cache.
  *
  * @return void
  */
 public function flush()
 {
     wincache_ucache_clear();
 }
コード例 #11
0
ファイル: wincache.php プロジェクト: reznikds/Reznik
 /**
  * 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
0
 public function flush($options= array()) {
     return wincache_ucache_clear();
 }
コード例 #13
0
 /**
  * @see wincache_ucache_clear();
  */
 public function clear()
 {
     $result = wincache_ucache_clear();
     $this->clearInfoArrays();
     return $result;
 }
コード例 #14
0
 /**
  * Remove all keys and value from cache
  */
 public function clean()
 {
     wincache_ucache_clear();
     return true;
 }
コード例 #15
0
ファイル: MemoryCache.php プロジェクト: scotchphp/scotch
 function clear()
 {
     wincache_ucache_clear();
 }
コード例 #16
0
 /**
  * Remove all items from the cache.
  *
  * @return void
  */
 protected function flushItems()
 {
     wincache_ucache_clear();
 }
コード例 #17
0
ファイル: wincache.php プロジェクト: rylanb/Play-Later
 function driver_clean($option = array())
 {
     wincache_ucache_clear();
     return true;
 }
コード例 #18
0
ファイル: Driver.php プロジェクト: jigoshop/Jigoshop2
 /**
  * @return bool
  */
 protected function driverClear()
 {
     return wincache_ucache_clear();
 }
コード例 #19
0
 {
     $orgi = $name;
     $name = self::getMemoryName($name);
     if ($skip_if_existing == false) {
         return wincache_ucache_set($name, $value, $time_in_second);
コード例 #20
0
ファイル: Wincache.php プロジェクト: top-think/framework
 /**
  * 清除缓存
  * @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();
     }
 }
コード例 #21
0
ファイル: CWinCache.php プロジェクト: charlymanja/traceper
 /**
  * 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();
 }
コード例 #22
0
 public function clean()
 {
     if (function_exists('wincache_ucache_clear')) {
         return wincache_ucache_clear();
     } else {
         return getMessage('Cache', 'unsupported', 'Wincache');
     }
 }
コード例 #23
0
 function flush()
 {
     return wincache_ucache_clear();
 }
コード例 #24
0
ファイル: wincache.class.php プロジェクト: liuyu121/myqee
 /**
  * 删除全部
  *
  * @return boolean
  */
 public function delete_all()
 {
     if (IS_DEBUG) {
         Core::debug()->info('wincache delete all cache');
     }
     return wincache_ucache_clear();
 }
コード例 #25
0
ファイル: WinCache.php プロジェクト: jasmun/Noco100
 /**
  * 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;
     }
 }
コード例 #26
0
ファイル: wincache.php プロジェクト: laiello/kangle-php-mysql
    }
    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;
}
コード例 #27
0
 /**
  * {@inheritdoc}
  */
 public function clear()
 {
     return wincache_ucache_clear();
 }
コード例 #28
0
 /**
  * {@inheritDoc}
  */
 function purge()
 {
     wincache_ucache_clear();
     parent::purge();
 }
コード例 #29
0
ファイル: WinCacheCache.php プロジェクト: laiello/masfletes
 /**
  * {@inheritdoc}
  */
 protected function doFlush()
 {
     return wincache_ucache_clear();
 }
コード例 #30
0
ファイル: WinCache.php プロジェクト: navtis/xerxes-pazpar2
 /**
  * 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);
     }
 }