本文整理汇总了PHP中wincache_ucache_delete函数的典型用法代码示例。如果您正苦于以下问题:PHP wincache_ucache_delete函数的具体用法?PHP wincache_ucache_delete怎么用?PHP wincache_ucache_delete使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了wincache_ucache_delete函数的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_delete
function cs_cache_delete($name, $ttl = 0)
{
$token = empty($ttl) ? $name : 'ttl_' . $name;
if (wincache_ucache_exists($token)) {
wincache_ucache_delete($token);
}
}
示例3: delete
/**
* 删除指定key的缓存,若$key===true则表示删除全部
*
* @param string $key
*/
public function delete($key)
{
if ($key === true) {
return $this->delete_all();
}
return \wincache_ucache_delete($key);
}
示例4: delete
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));
}
return $deleted;
}
示例5: delete
public function delete($key)
{
if (function_exists('wincache_ucache_delete')) {
return wincache_ucache_delete($key);
} else {
return getMessage('Cache', 'unsupported', 'Wincache');
}
}
示例6: remove
public function remove($key)
{
try {
return wincache_ucache_delete($key);
} catch (Exception $ex) {
throw new Exception($ex->getMessage(), $ex->getCode());
}
}
示例7: delete
/**
* (Plug-in replacement for memcache API) Delete data from the persistant cache.
*
* @param mixed Key name
*/
function delete($key)
{
// Update list of e-objects
global $ECACHE_OBJECTS;
unset($ECACHE_OBJECTS[$key]);
wincache_ucache_set(get_file_base() . 'ECACHE_OBJECTS', $ECACHE_OBJECTS, 0);
wincache_ucache_delete($key);
}
示例8: delete
/**
* Deletes an item out of the cache, or multiple items
*
* @param string|array $key
* @return int
*/
public function delete($key)
{
$delCount = 0;
foreach (array_filter((array) $key) as $cacheKey) {
if (wincache_ucache_delete($cacheKey)) {
++$delCount;
}
}
return $delCount;
}
示例9: clean
public function clean($group, $mode = null)
{
$allinfo = wincache_ucache_info();
$keys = $allinfo['cache_entries'];
$secret = $this->_hash;
foreach ($keys as $key) {
if (strpos($key['key_name'], $secret . '-cache-' . $group . '-') === 0 xor $mode != 'group') {
wincache_ucache_delete($key['key_name']);
}
}
return true;
}
示例10: clear
/**
* Delete all keys from the cache
*
* @param bool $check if true will check expiration, otherwise delete all
* @return bool True if the cache was successfully cleared, false otherwise
*/
public function clear($check)
{
if ($check) {
return true;
}
$info = wincache_ucache_info();
$cacheKeys = $info['ucache_entries'];
unset($info);
foreach ($cacheKeys as $key) {
wincache_ucache_delete($key['key_name']);
}
return true;
}
示例11: filter
public function filter($prefix)
{
$prefixLen = strlen($prefix);
$info = wincache_ucache_info();
$keysToDelete = array();
foreach ($info['ucache_entries'] as $entry) {
if (empty($entry['is_session']) && 0 === strncmp($entry['key_name'], $prefix, $prefixLen)) {
$keysToDelete[] = $entry['key_name'];
}
}
if ($keysToDelete) {
wincache_ucache_delete($keysToDelete);
}
return true;
}
示例12: loadClass
/**
* {@inheritdoc}
*/
function loadClass($class)
{
// Look if the cache has anything for this class.
if ($file = wincache_ucache_get($this->prefix . $class)) {
if (is_file($file)) {
require $file;
return;
}
wincache_ucache_delete($this->prefix . $class);
}
// Resolve cache miss.
$api = new LoadClassGetFileInjectedApi($class);
if ($this->finder->apiFindFile($api, $class)) {
wincache_ucache_set($this->prefix . $class, $api->getFile());
}
}
示例13: 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;
}
示例14: rm
/**
* 删除缓存
* @access public
* @param string $name 缓存变量名
* @return boolean
*/
public function rm($name)
{
return wincache_ucache_delete($this->options['prefix'] . $name);
}
示例15: clear
/**
* Delete cache entry
* @return bool
* @param $key string
**/
function clear($key)
{
if (!$this->dsn) {
return;
}
$ndx = $this->prefix . '.' . $key;
$parts = explode('=', $this->dsn, 2);
switch ($parts[0]) {
case 'apc':
return apc_delete($ndx);
case 'memcache':
return memcache_delete($this->ref, $ndx);
case 'wincache':
return wincache_ucache_delete($ndx);
case 'xcache':
return xcache_unset($ndx);
case 'folder':
return is_file($file = $parts[1] . $ndx) && @unlink($file);
}
return FALSE;
}