mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-21 05:43:55 -07:00
Eaccelerator removed
Удаляем eaccelerator из поддерживаемых движков кеширования - поддержка прекращена в 2007 году, последняя совместимая версия 5.4.
This commit is contained in:
parent
0776fb9f3b
commit
bd6dc26fcb
2 changed files with 2 additions and 137 deletions
|
@ -194,14 +194,6 @@ class CACHES
|
|||
$this->ref[$cache_name] =& $this->obj[$cache_name];
|
||||
break;
|
||||
|
||||
case 'eaccelerator':
|
||||
if (!isset($this->obj[$cache_name]))
|
||||
{
|
||||
$this->obj[$cache_name] = new cache_eaccelerator($this->cfg['prefix']);
|
||||
}
|
||||
$this->ref[$cache_name] =& $this->obj[$cache_name];
|
||||
break;
|
||||
|
||||
case 'apc':
|
||||
if (!isset($this->obj[$cache_name]))
|
||||
{
|
||||
|
@ -827,61 +819,6 @@ class cache_redis extends cache_common
|
|||
}
|
||||
}
|
||||
|
||||
class cache_eaccelerator extends cache_common
|
||||
{
|
||||
var $used = true;
|
||||
var $engine = 'eAccelerator';
|
||||
var $prefix = null;
|
||||
|
||||
function cache_eaccelerator ($prefix = null)
|
||||
{
|
||||
if (!$this->is_installed())
|
||||
{
|
||||
die('Error: eAccelerator extension not installed');
|
||||
}
|
||||
$this->dbg_enabled = sql_dbg_enabled();
|
||||
$this->prefix = $prefix;
|
||||
}
|
||||
|
||||
function get ($name, $get_miss_key_callback = '', $ttl = 0)
|
||||
{
|
||||
$this->cur_query = "cache->get('$name')";
|
||||
$this->debug('start');
|
||||
$this->debug('stop');
|
||||
$this->cur_query = null;
|
||||
$this->num_queries++;
|
||||
|
||||
return eaccelerator_get($this->prefix . $name);
|
||||
}
|
||||
|
||||
function set ($name, $value, $ttl = 0)
|
||||
{
|
||||
$this->cur_query = "cache->set('$name')";
|
||||
$this->debug('start');
|
||||
$this->debug('stop');
|
||||
$this->cur_query = null;
|
||||
$this->num_queries++;
|
||||
|
||||
return eaccelerator_put($this->prefix . $name, $value, $ttl);
|
||||
}
|
||||
|
||||
function rm ($name = '')
|
||||
{
|
||||
$this->cur_query = "cache->rm('$name')";
|
||||
$this->debug('start');
|
||||
$this->debug('stop');
|
||||
$this->cur_query = null;
|
||||
$this->num_queries++;
|
||||
|
||||
return eaccelerator_rm($this->prefix . $name);
|
||||
}
|
||||
|
||||
function is_installed ()
|
||||
{
|
||||
return function_exists('eaccelerator_get');
|
||||
}
|
||||
}
|
||||
|
||||
class cache_apc extends cache_common
|
||||
{
|
||||
var $used = true;
|
||||
|
@ -1575,74 +1512,6 @@ class datastore_redis extends datastore_common
|
|||
}
|
||||
}
|
||||
|
||||
class datastore_eaccelerator extends datastore_common
|
||||
{
|
||||
var $engine = 'eAccelerator';
|
||||
var $prefix = null;
|
||||
|
||||
function datastore_eaccelerator ($prefix = null)
|
||||
{
|
||||
if (!$this->is_installed())
|
||||
{
|
||||
die('Error: eAccelerator extension not installed');
|
||||
}
|
||||
$this->dbg_enabled = sql_dbg_enabled();
|
||||
$this->prefix = $prefix;
|
||||
}
|
||||
|
||||
function store ($title, $var)
|
||||
{
|
||||
$this->data[$title] = $var;
|
||||
|
||||
$this->cur_query = "cache->set('$title')";
|
||||
$this->debug('start');
|
||||
$this->debug('stop');
|
||||
$this->cur_query = null;
|
||||
$this->num_queries++;
|
||||
|
||||
eaccelerator_put($this->prefix . $title, $var);
|
||||
}
|
||||
|
||||
function clean ()
|
||||
{
|
||||
foreach ($this->known_items as $title => $script_name)
|
||||
{
|
||||
$this->cur_query = "cache->rm('$title')";
|
||||
$this->debug('start');
|
||||
$this->debug('stop');
|
||||
$this->cur_query = null;
|
||||
$this->num_queries++;
|
||||
|
||||
eaccelerator_rm($this->prefix . $title);
|
||||
}
|
||||
}
|
||||
|
||||
function _fetch_from_store ()
|
||||
{
|
||||
if (!$items = $this->queued_items)
|
||||
{
|
||||
$src = $this->_debug_find_caller('enqueue');
|
||||
trigger_error("Datastore: item '$item' already enqueued [$src]", E_USER_ERROR);
|
||||
}
|
||||
|
||||
foreach ($items as $item)
|
||||
{
|
||||
$this->cur_query = "cache->get('$item')";
|
||||
$this->debug('start');
|
||||
$this->debug('stop');
|
||||
$this->cur_query = null;
|
||||
$this->num_queries++;
|
||||
|
||||
$this->data[$item] = eaccelerator_get($this->prefix . $item);
|
||||
}
|
||||
}
|
||||
|
||||
function is_installed ()
|
||||
{
|
||||
return function_exists('eaccelerator_get');
|
||||
}
|
||||
}
|
||||
|
||||
class datastore_xcache extends datastore_common
|
||||
{
|
||||
var $prefix = null;
|
||||
|
@ -1884,10 +1753,6 @@ switch ($bb_cfg['datastore_type'])
|
|||
$datastore = new datastore_redis($bb_cfg['cache']['redis'], $bb_cfg['cache']['prefix']);
|
||||
break;
|
||||
|
||||
case 'eaccelerator':
|
||||
$datastore = new datastore_eaccelerator($bb_cfg['cache']['prefix']);
|
||||
break;
|
||||
|
||||
case 'xcache':
|
||||
$datastore = new datastore_xcache($bb_cfg['cache']['prefix']);
|
||||
break;
|
||||
|
|
|
@ -120,7 +120,7 @@ $bb_cfg['cache']['redis'] = array(
|
|||
'con_required' => true,
|
||||
);
|
||||
|
||||
// Available cache types: memcache, sqlite, redis, eaccelerator, apc, xcache (default of filecache)
|
||||
// Available cache types: memcache, sqlite, redis, apc, xcache (default of filecache)
|
||||
# name => array( (string) type, (array) cfg )
|
||||
$bb_cfg['cache']['engines'] = array(
|
||||
'bb_cache' => array('filecache', array()),
|
||||
|
@ -132,7 +132,7 @@ $bb_cfg['cache']['engines'] = array(
|
|||
'bb_poll_data' => array('filecache', array()),
|
||||
);
|
||||
// Datastore
|
||||
// Available datastore types: memcache, sqlite, redis, eaccelerator, apc, xcache (default filecache)
|
||||
// Available datastore types: memcache, sqlite, redis, apc, xcache (default filecache)
|
||||
$bb_cfg['datastore_type'] = 'filecache';
|
||||
|
||||
// Server
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue