mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-14 10:37:30 -07:00
Refactored cache drivers 🗃 (#1553)
* Refactored cache drivers 🗃 * Updated * Update APCu.php * Update APCu.php * Update APCu.php * Update APCu.php * Update APCu.php * Update Redis.php * Update Redis.php * Updated * Update * Updated * Update config.php * Updated * Updated * Updated * Updated * Update config.php * Updated * Update composer.lock * Delete composer.lock * Create composer.lock * Update composer.lock * Update common.php * Update File.php * Updated * Update Sqlite.php * Update common.php * Update Redis.php * Updated * Update common.php * Updated
This commit is contained in:
parent
bfd61166be
commit
17a320b7c8
23 changed files with 1561 additions and 1066 deletions
15
common.php
15
common.php
|
@ -129,24 +129,15 @@ switch ($bb_cfg['datastore_type']) {
|
|||
case 'apcu':
|
||||
$datastore = new TorrentPier\Legacy\Datastore\APCu($bb_cfg['cache']['prefix']);
|
||||
break;
|
||||
|
||||
case 'memcache':
|
||||
$datastore = new TorrentPier\Legacy\Datastore\Memcache($bb_cfg['cache']['memcache'], $bb_cfg['cache']['prefix']);
|
||||
case 'memcached':
|
||||
$datastore = new TorrentPier\Legacy\Datastore\Memcached($bb_cfg['cache']['memcached'], $bb_cfg['cache']['prefix']);
|
||||
break;
|
||||
|
||||
case 'sqlite':
|
||||
$default_cfg = [
|
||||
'db_file_path' => $bb_cfg['cache']['db_dir'] . 'datastore.sqlite.db',
|
||||
'pconnect' => true,
|
||||
'con_required' => true,
|
||||
];
|
||||
$datastore = new TorrentPier\Legacy\Datastore\Sqlite($default_cfg, $bb_cfg['cache']['prefix']);
|
||||
$datastore = new TorrentPier\Legacy\Datastore\Sqlite($bb_cfg['cache']['db_dir'] . 'datastore', $bb_cfg['cache']['prefix']);
|
||||
break;
|
||||
|
||||
case 'redis':
|
||||
$datastore = new TorrentPier\Legacy\Datastore\Redis($bb_cfg['cache']['redis'], $bb_cfg['cache']['prefix']);
|
||||
break;
|
||||
|
||||
case 'filecache':
|
||||
default:
|
||||
$datastore = new TorrentPier\Legacy\Datastore\File($bb_cfg['cache']['db_dir'] . 'datastore/', $bb_cfg['cache']['prefix']);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue