fix: update datastore type from 'filecache' to 'file' for consistency

Modified the datastore type in common.php and README.md to reflect the new unified cache system terminology. This change ensures consistency across the codebase and documentation following the recent implementation of the unified cache system.
This commit is contained in:
Yury Pikhtarev 2025-06-18 13:52:47 +04:00
commit 00b0f2ffa2
No known key found for this signature in database
2 changed files with 6 additions and 6 deletions

View file

@ -175,7 +175,7 @@ function CACHE(string $cache_name): \TorrentPier\Cache\CacheManager
*/ */
function datastore(): \TorrentPier\Cache\DatastoreManager function datastore(): \TorrentPier\Cache\DatastoreManager
{ {
return TorrentPier\Cache\UnifiedCacheSystem::getInstance()->getDatastore(config()->get('datastore_type', 'filecache')); return TorrentPier\Cache\UnifiedCacheSystem::getInstance()->getDatastore(config()->get('datastore_type', 'file'));
} }
/** /**

View file

@ -142,7 +142,7 @@ function CACHE(string $cache_name): \TorrentPier\Cache\CacheManager {
} }
function datastore(): \TorrentPier\Cache\DatastoreManager { function datastore(): \TorrentPier\Cache\DatastoreManager {
return TorrentPier\Cache\UnifiedCacheSystem::getInstance()->getDatastore(config()->get('datastore_type', 'filecache')); return TorrentPier\Cache\UnifiedCacheSystem::getInstance()->getDatastore(config()->get('datastore_type', 'file'));
} }
``` ```
@ -171,14 +171,14 @@ $bb_cfg['cache'] = [
'db_dir' => realpath(BB_ROOT) . '/internal_data/cache/filecache/', 'db_dir' => realpath(BB_ROOT) . '/internal_data/cache/filecache/',
'prefix' => 'tp_', 'prefix' => 'tp_',
'engines' => [ 'engines' => [
'bb_cache' => ['filecache'], // Uses Nette FileStorage 'bb_cache' => ['file'], // Uses Nette FileStorage
'session_cache' => ['sqlite'], // Uses Nette SQLiteStorage 'session_cache' => ['sqlite'], // Uses Nette SQLiteStorage
'tr_cache' => ['filecache'], // Uses Nette FileStorage 'tr_cache' => ['file'], // Uses Nette FileStorage
// ... other caches // ... other caches
], ],
]; ];
$bb_cfg['datastore_type'] = 'filecache'; // Uses Nette FileStorage $bb_cfg['datastore_type'] = 'file'; // Uses Nette FileStorage
``` ```
## Storage Types ## Storage Types
@ -187,7 +187,7 @@ $bb_cfg['datastore_type'] = 'filecache'; // Uses Nette FileStorage
| Legacy Type | Nette Storage | Features | | Legacy Type | Nette Storage | Features |
|------------|---------------|----------| |------------|---------------|----------|
| `filecache` | `FileStorage` | File-based, persistent, dependencies | | `file` | `FileStorage` | File-based, persistent, dependencies |
| `sqlite` | `SQLiteStorage` | Database, supports tags and complex dependencies | | `sqlite` | `SQLiteStorage` | Database, supports tags and complex dependencies |
| `memory` | `MemoryStorage` | In-memory, fastest, non-persistent | | `memory` | `MemoryStorage` | In-memory, fastest, non-persistent |