本文整理汇总了PHP中xcache_unset函数的典型用法代码示例。如果您正苦于以下问题:PHP xcache_unset函数的具体用法?PHP xcache_unset怎么用?PHP xcache_unset使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了xcache_unset函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: remove
function remove($key)
{
if (!ini_get('xcache.var_size')) {
return;
}
return @xcache_unset($key);
}
示例2: delete
public function delete($id, $tag = FALSE)
{
if ($tag !== FALSE) {
Kohana::log('error', 'Cache: tags are unsupported by the Xcache driver');
return TRUE;
} elseif ($id !== TRUE) {
if (xcache_isset($id)) {
return xcache_unset($id);
}
return FALSE;
} else {
// Do the login
$this->auth();
$result = TRUE;
for ($i = 0, $max = xcache_count(XC_TYPE_VAR); $i < $max; $i++) {
if (xcache_clear_cache(XC_TYPE_VAR, $i) !== NULL) {
$result = FALSE;
break;
}
}
// Undo the login
$this->auth(TRUE);
return $result;
}
return TRUE;
}
示例3: xp_unset
function xp_unset($var)
{
if (XCACHE_ENABLED) {
xcache_unset(XCACHE_PREFIX . $var);
}
unlink("./cache/" . XCACHE_PREFIX . $var);
}
示例4: clean
function clean($basedir, $initdir = false, $filename = false)
{
if (strlen($filename)) {
$basedir_version = xcache_get($this->sid . $basedir);
if ($basedir_version === null) {
return true;
}
if ($initdir !== false) {
$initdir_version = xcache_get($basedir_version . "|" . $initdir);
if ($initdir_version === null) {
return true;
}
} else {
$initdir_version = "";
}
xcache_unset($basedir_version . "|" . $initdir_version . "|" . $filename);
} else {
if (strlen($initdir)) {
$basedir_version = xcache_get($this->sid . $basedir);
if ($basedir_version === null) {
return true;
}
xcache_unset($basedir_version . "|" . $initdir);
} else {
xcache_unset($this->sid . $basedir);
}
}
return true;
}
示例5: delete
/**
* @param string $key
* @return boolean
*/
public function delete($key)
{
if (!xcache_isset($key)) {
return TRUE;
}
return xcache_unset($key);
}
示例6: setUp
/**
* Check for extension availability and perform cleanup.
*/
protected function setUp()
{
if (!extension_loaded('xcache')) {
$this->markTestSkipped('XCache extension not available.');
}
xcache_unset('test');
}
示例7: delData
/**
* Delete cache from shared memory
*
* @param string $sKey - file name
* @return result of the operation
*/
function delData($sKey)
{
if (!xcache_isset($sKey)) {
return true;
}
return xcache_unset($sKey);
}
示例8: del
/**
*/
function del($name)
{
if (!$this->is_ready()) {
return null;
}
return xcache_unset($name);
}
示例9: destroy
/**
* Destroy a session
*
* @param integer $session_id The session ID being destroyed
*
* @return boolean True on success, false otherwise
*
* @since __DEPLOY_VERSION__
*/
public function destroy($session_id)
{
if (!xcache_isset($this->prefix . $session_id)) {
return true;
}
return xcache_unset($this->prefix . $session_id);
}
示例10: delete
public function delete($key)
{
if (!$key) {
return false;
}
return xcache_unset($key);
}
示例11: cs_cache_delete
function cs_cache_delete($name, $ttl = 0)
{
$token = empty($ttl) ? $name : 'ttl_' . $name;
if (xcache_isset($token)) {
xcache_unset($token);
}
}
示例12: remove
/**
* Remove a cached data entry by id and group
*
* @access public
* @param string $id The cache data id
* @param string $group The cache data group
* @return boolean True on success, false otherwise
* @since 1.5
*/
function remove($id, $group)
{
$cache_id = $this->_getCacheId($id, $group);
if (!xcache_isset($cache_id)) {
return true;
}
return xcache_unset($cache_id);
}
示例13: 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]);
xcache_set(get_file_base() . 'ECACHE_OBJECTS', $ECACHE_OBJECTS, 0);
xcache_unset($key);
}
示例14: destroy
/**
* Destroy the data for a particular session identifier in the SessionHandler backend.
*
* @param string $id The session identifier.
*
* @return boolean True on success, false otherwise.
*
* @since 11.1
*/
public function destroy($id)
{
$sess_id = 'sess_' . $id;
if (!xcache_isset($sess_id)) {
return true;
}
return xcache_unset($sess_id);
}
示例15: clear
public function clear($tags)
{
$tags = (array) $this->_mapTags($tags);
foreach ($tags as $tag) {
xcache_unset($tag);
}
return true;
}