mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-22 06:13:58 -07:00
r169
фикс кеша sqlite git-svn-id: https://torrentpier2.googlecode.com/svn/trunk@169 a8ac35ab-4ca4-ca47-4c2d-a49a94f06293
This commit is contained in:
parent
5ad1692e5e
commit
8fbdd3d517
2 changed files with 8 additions and 22 deletions
|
@ -158,19 +158,6 @@ class CACHES
|
||||||
$this->ref[$cache_name] =& $this->obj[$cache_name];
|
$this->ref[$cache_name] =& $this->obj[$cache_name];
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'db_sqlite':
|
|
||||||
if (!isset($this->obj[$cache_name]))
|
|
||||||
{
|
|
||||||
$cache_cfg['pconnect'] = $this->cfg['pconnect'];
|
|
||||||
$cache_cfg['db_file_path'] = $this->get_db_path($cache_name, $cache_cfg, '.sqlite.db');
|
|
||||||
$cache_cfg['table_name'] = $cache_name;
|
|
||||||
$cache_cfg['table_schema'] = $this->get_table_schema($cache_cfg);
|
|
||||||
|
|
||||||
$this->obj[$cache_name] = new sqlite_common($cache_cfg);
|
|
||||||
}
|
|
||||||
$this->ref[$cache_name] =& $this->obj[$cache_name];
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'redis':
|
case 'redis':
|
||||||
if (!isset($this->obj[$cache_name]))
|
if (!isset($this->obj[$cache_name]))
|
||||||
{
|
{
|
||||||
|
@ -1095,10 +1082,9 @@ class datastore_sqlite extends datastore_common
|
||||||
'db_file_path' => '/path/to/datastore.db.sqlite',
|
'db_file_path' => '/path/to/datastore.db.sqlite',
|
||||||
'table_name' => 'datastore',
|
'table_name' => 'datastore',
|
||||||
'table_schema' => 'CREATE TABLE datastore (
|
'table_schema' => 'CREATE TABLE datastore (
|
||||||
cache_name VARCHAR(255),
|
ds_title VARCHAR(255),
|
||||||
cache_expire_time INT,
|
ds_data TEXT,
|
||||||
cache_value TEXT,
|
PRIMARY KEY (ds_title)
|
||||||
PRIMARY KEY (cache_name)
|
|
||||||
)',
|
)',
|
||||||
'pconnect' => true,
|
'pconnect' => true,
|
||||||
'con_required' => true,
|
'con_required' => true,
|
||||||
|
@ -1108,7 +1094,7 @@ class datastore_sqlite extends datastore_common
|
||||||
function datastore_sqlite ($cfg)
|
function datastore_sqlite ($cfg)
|
||||||
{
|
{
|
||||||
$this->cfg = array_merge($this->cfg, $cfg);
|
$this->cfg = array_merge($this->cfg, $cfg);
|
||||||
$this->db = new sqlite_common($cfg);
|
$this->db = new sqlite_common($this->cfg);
|
||||||
}
|
}
|
||||||
|
|
||||||
function store ($item_name, $item_data)
|
function store ($item_name, $item_data)
|
||||||
|
@ -1415,7 +1401,7 @@ switch ($bb_cfg['datastore_type'])
|
||||||
|
|
||||||
case 'sqlite':
|
case 'sqlite':
|
||||||
$default_cfg = array(
|
$default_cfg = array(
|
||||||
'db_file_path' => $bb_cfg['cache']['db_dir'] . '/bb_datastore.sqlite.db',
|
'db_file_path' => $bb_cfg['cache']['db_dir'] .'bb_datastore.sqlite.db',
|
||||||
'pconnect' => true,
|
'pconnect' => true,
|
||||||
'con_required' => true,
|
'con_required' => true,
|
||||||
);
|
);
|
||||||
|
|
|
@ -57,8 +57,8 @@ $bb_cfg['css_ver'] = 1;
|
||||||
|
|
||||||
// Increase number of revision after update
|
// Increase number of revision after update
|
||||||
$bb_cfg['tp_version'] = '2.0.2';
|
$bb_cfg['tp_version'] = '2.0.2';
|
||||||
$bb_cfg['tp_release_state'] = 'TP II r168';
|
$bb_cfg['tp_release_state'] = 'TP II r169';
|
||||||
$bb_cfg['tp_release_date'] = '27-07-2011';
|
$bb_cfg['tp_release_date'] = '28-07-2011';
|
||||||
|
|
||||||
$bb_cfg['board_disabled_msg'] = 'форум временно отключен'; // 'forums temporarily disabled'; // show this msg if board has been disabled via ON/OFF trigger
|
$bb_cfg['board_disabled_msg'] = 'форум временно отключен'; // 'forums temporarily disabled'; // show this msg if board has been disabled via ON/OFF trigger
|
||||||
$bb_cfg['srv_overloaded_msg'] = "Извините, в данный момент сервер перегружен\nПопробуйте повторить запрос через несколько минут";
|
$bb_cfg['srv_overloaded_msg'] = "Извините, в данный момент сервер перегружен\nПопробуйте повторить запрос через несколько минут";
|
||||||
|
@ -91,7 +91,7 @@ $bb_cfg['cache']['redis'] = array(
|
||||||
'con_required' => true,
|
'con_required' => true,
|
||||||
);
|
);
|
||||||
|
|
||||||
// Available cache types: memcache, sqlite, db_sqlite, redis, eaccelerator, apc, xcache (default of filecache)
|
// Available cache types: memcache, sqlite, redis, eaccelerator, apc, xcache (default of filecache)
|
||||||
# name => array( (string) type, (array) cfg )
|
# name => array( (string) type, (array) cfg )
|
||||||
$bb_cfg['cache']['engines'] = array(
|
$bb_cfg['cache']['engines'] = array(
|
||||||
'bb_cache' => array('filecache', array()),
|
'bb_cache' => array('filecache', array()),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue