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:
Roman Kelesidis 2024-07-22 14:55:04 +07:00 committed by GitHub
commit 17a320b7c8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
23 changed files with 1561 additions and 1066 deletions

View file

@ -1,21 +0,0 @@
<?php
/**
* TorrentPier Bull-powered BitTorrent tracker engine
*
* @copyright Copyright (c) 2005-2024 TorrentPier (https://torrentpier.com)
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
*/
if (!defined('BB_ROOT')) {
die(basename(__FILE__));
}
global $cron_runtime_log;
foreach ($bb_cfg['cache']['engines'] as $cache_name => $cache_val) {
if (method_exists(CACHE($cache_name), 'gc')) {
$changes = CACHE($cache_name)->gc();
$cron_runtime_log[] = date('Y-m-d H:i:s') . " -- " . str_pad("$cache_name ", 25, '-', STR_PAD_RIGHT) . " del: $changes";
}
}