本文整理汇总了PHP中xcache_unset函数的典型用法代码示例。如果您正苦于以下问题:PHP xcache_unset函数的具体用法?PHP xcache_unset怎么用?PHP xcache_unset使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了xcache_unset函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: remove
function remove($key)
{
if (!ini_get('xcache.var_size')) {
return;
}
return @xcache_unset($key);
}
开发者ID:pihizi,项目名称:qf,代码行数:7,代码来源:cache_xcache.php
示例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;
}
开发者ID:AsteriaGamer,项目名称:steamdriven-kohana,代码行数:26,代码来源:Xcache.php
示例3: xp_unset
function xp_unset($var)
{
if (XCACHE_ENABLED) {
xcache_unset(XCACHE_PREFIX . $var);
}
unlink("./cache/" . XCACHE_PREFIX . $var);
}
开发者ID:KasaiDot,项目名称:XDCCParser-global,代码行数:7,代码来源:core.php
示例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;
}
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:29,代码来源:cache_xcache.php
示例5: delete
/**
* @param string $key
* @return boolean
*/
public function delete($key)
{
if (!xcache_isset($key)) {
return TRUE;
}
return xcache_unset($key);
}
开发者ID:Lazary,项目名称:webasyst,代码行数:11,代码来源:waXcacheCacheAdapter.class.php
示例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');
}
开发者ID:djordjes,项目名称:layercache,代码行数:10,代码来源:XCacheTest.php
示例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);
}
开发者ID:toxalot,项目名称:dolphin.pro,代码行数:13,代码来源:BxDolCacheXCache.php
示例8: del
/**
*/
function del($name)
{
if (!$this->is_ready()) {
return null;
}
return xcache_unset($name);
}
开发者ID:yfix,项目名称:yf,代码行数:9,代码来源:yf_cache_driver_xcache.class.php
示例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);
}
开发者ID:Rai-Ka,项目名称:joomla-cms,代码行数:16,代码来源:XCacheHandler.php
示例10: delete
public function delete($key)
{
if (!$key) {
return false;
}
return xcache_unset($key);
}
开发者ID:MrMoDoor,项目名称:Carbon-Forum,代码行数:7,代码来源:XCache.class.php
示例11: cs_cache_delete
function cs_cache_delete($name, $ttl = 0)
{
$token = empty($ttl) ? $name : 'ttl_' . $name;
if (xcache_isset($token)) {
xcache_unset($token);
}
}
开发者ID:aberrios,项目名称:WEBTHESGO,代码行数:7,代码来源:xcache.php
示例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);
}
开发者ID:joebushi,项目名称:joomla,代码行数:17,代码来源:xcache.php
示例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);
}
开发者ID:erico-deh,项目名称:ocPortal,代码行数:13,代码来源:caches_xcache.php
示例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);
}
开发者ID:shoffmann52,项目名称:install-from-web-server,代码行数:17,代码来源:xcache.php
示例15: clear
public function clear($tags)
{
$tags = (array) $this->_mapTags($tags);
foreach ($tags as $tag) {
xcache_unset($tag);
}
return true;
}
开发者ID:askzap,项目名称:ultimate,代码行数:8,代码来源:Xcache.php
示例16: set
/**
* Sets a value to the variable store
* @param string $key The key of the variable
* @param mixed $value The value of the variable
* @param integer $timeToLive Set to a number of seconds to make the variable expire in that amount of time
* @return null
*/
public function set($key, $value = null, $timeToLive = null)
{
if ($value === null) {
xcache_unset($key);
} else {
xcache_set($key, $value, $timeToLive);
}
}
开发者ID:BGCX261,项目名称:zibo-svn-to-git,代码行数:15,代码来源:XCacheIO.php
示例17: delete
/**
* Delete cache item by key
*/
public function delete($keys)
{
foreach ($keys as $key) {
if (!xcache_unset($key)) {
return NO;
}
}
return YES;
}
开发者ID:shnhrrsn-abandoned,项目名称:EightPHP,代码行数:12,代码来源:xcache.php
示例18: delete
/**
* Delete cache item by key
*/
public function delete($keys)
{
foreach ($keys as $key) {
if (!xcache_unset($key)) {
return FALSE;
}
}
return TRUE;
}
开发者ID:anqqa,项目名称:Anqh,代码行数:12,代码来源:Xcache.php
示例19: delete
function delete($key)
{
$key = $this->key($key);
if (function_exists('apc_delete')) {
return apc_delete($key);
}
if (function_exists('xcache_unset')) {
return xcache_unset($key);
}
}
开发者ID:splitice,项目名称:radical-common,代码行数:10,代码来源:Memory.php
示例20: _before
public function _before(UnitTester $I)
{
if (!function_exists('xcache_emulation') && !function_exists('xcache_get')) {
throw new \PHPUnit_Framework_SkippedTestError('Warning: xcache extension is not loaded');
}
$I->haveServiceInDi('modelsMetadata', function () {
return new Xcache(['prefix' => 'app\\', 'lifetime' => 60]);
}, true);
$this->data = (require PATH_FIXTURES . 'metadata/robots.php');
xcache_unset('$PMM$app\\');
}
开发者ID:phalcon,项目名称:cphalcon,代码行数:11,代码来源:XcacheCest.php
注:本文中的xcache_unset函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论