Файл: adultscript-2.0.3-pro/files/libraries/framework/cache/xcache.php
Строк: 30
<?php
defined('_VALID') or die('Restricted Access!');
class VCache_Driver_xcache extends VCache
{
public function __construct()
{
parent::__construct();
}
public function get($cache_id, $expire=NULL)
{
$key = $this->get_key($cache_id);
if (!xcache_isset($key)) {
return FALSE;
}
return xcache_get($key);
}
public function store($cache_id, $data, $expire=NULL)
{
$expire = (isset($expire)) ? $expire : $this->lifetime;
return xcache_set($this->get_key($cache_id), $data, $expire);
}
public function remove($cache_id)
{
$key= $this->get_key($cache_id);
if (!xcache_isset($key)) {
return TRUE;
}
return xcache_unset($key);
}
public function gc()
{
return TRUE;
}
public function clear()
{
}
public function test()
{
return extension_loaded('xcache');
}
}
?>