本文整理汇总了PHP中apc_delete函数的典型用法代码示例。如果您正苦于以下问题:PHP apc_delete函数的具体用法?PHP apc_delete怎么用?PHP apc_delete使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了apc_delete函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: del
public static function del($key)
{
ApcCache::check();
$res = false;
apc_fetch($key, $res);
return $res ? apc_delete($key) : true;
}
示例2: clean
public function clean($baseDir, $initDir = false, $filename = false)
{
if (strlen($filename)) {
$baseDirVersion = apc_fetch($this->sid . $baseDir);
if ($baseDirVersion === false) {
return true;
}
if ($initDir !== false) {
$initDirVersion = apc_fetch($baseDirVersion . "|" . $initDir);
if ($initDirVersion === false) {
return true;
}
} else {
$initDirVersion = "";
}
apc_delete($baseDirVersion . "|" . $initDirVersion . "|" . $filename);
} else {
if (strlen($initDir)) {
$baseDirVersion = apc_fetch($this->sid . $baseDir);
if ($baseDirVersion === false) {
return true;
}
apc_delete($baseDirVersion . "|" . $initDir);
} else {
apc_delete($this->sid . $baseDir);
}
}
return true;
}
示例3: setUp
/**
* Check for extension availability and perform cleanup.
*/
protected function setUp()
{
if (!extension_loaded('apc') || !ini_get('apc.enable_cli')) {
$this->markTestSkipped('APC extension not available.');
}
apc_delete('test');
}
示例4: delete_data
/**
* (non-PHPdoc)
* @see Ai1ec_Write_Data_To_Cache::delete_data()
*/
public function delete_data($key)
{
if (false === apc_delete($this->_key($key))) {
return false;
}
return true;
}
示例5: unsetallAction
public function unsetallAction()
{
foreach ($this->cache_keys as $key) {
apc_delete($this->hash . '-' . $key);
}
$this->_redirect('/cache');
}
示例6: delete
public function delete($key, $options= array()) {
$deleted = false;
if (!isset($options['multiple_object_delete']) || empty($options['multiple_object_delete'])) {
$deleted= apc_delete($this->getCacheKey($key));
}
return $deleted;
}
示例7: delete
/**
* Remove an item from the cache:
*/
public function delete($key)
{
if (!self::isEnabled()) {
return false;
}
return apc_delete($this->cachePrefix . $key);
}
示例8: remove
public function remove($key)
{
if ($this->apcu) {
return apcu_delete((string) $key);
}
return apc_delete((string) $key);
}
示例9: delete
public function delete($key)
{
if (!$this->isActive()) {
return false;
}
return apc_delete($key);
}
示例10: clear
public function clear($prefix = '')
{
$ns = $this->getNamespace() . $prefix;
$ns = preg_quote($ns, '/');
$iter = new \APCIterator('/^' . $ns . '/');
return apc_delete($iter);
}
示例11: delete
/**
* Delete cache by $key. Optional $delay seconds if supported.
*
* @param $key
* @param int $delay
* @return bool
*/
public function delete($key, $delay = 0)
{
if (!$this->open()) {
return false;
}
return apc_delete($key);
}
示例12: delete
static function delete($key) {
if (self::isAvailable()) {
return apc_delete(APC_PREFIX . $key);
} else {
return false;
}
}
示例13: deleteCacheByPrefix
/**
* Removes all the cached files starting with $prefix
* @param string $prefix The prefix
* @return void
*/
public function deleteCacheByPrefix($prefix)
{
$prefix = CACHEPREFIX . $prefix;
foreach (new \APCIterator('user', "/^{$prefix}/") as $iterator) {
apc_delete($iterator['key']);
}
}
示例14: delItem
public function delItem($key)
{
if (empty($key)) {
throw new CacheException('CACHE ERROR:key is empty');
}
return apc_delete($key);
}
示例15: deleteKey
/**
* Delete a key from the cache pool
*
* @param $key
*
* @return bool
*/
public function deleteKey($key)
{
if (function_exists('apcu_delete')) {
return apcu_delete($key);
}
return apc_delete($key);
}