1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-08-06 16:46:30 +02:00

fix: rewrite and improve caching (#3594)

This commit is contained in:
Dag
2023-09-10 21:50:15 +02:00
committed by GitHub
parent a786bbd4e0
commit 4b9f6f7e53
45 changed files with 993 additions and 1169 deletions

View File

@@ -27,17 +27,13 @@ class CacheTest extends TestCase
'path' => $temporaryFolder,
'enable_purge' => true,
]);
$sut->setScope('scope');
$sut->purgeCache(-1);
$sut->setKey(['key']);
$sut->clear();
$this->assertNull($sut->getTime());
$this->assertNull($sut->loadData());
$this->assertNull($sut->get('key'));
$sut->saveData('data');
$this->assertSame('data', $sut->loadData());
$this->assertIsNumeric($sut->getTime());
$sut->purgeCache(-1);
$sut->set('key', 'data', 5);
$this->assertSame('data', $sut->get('key'));
$sut->clear();
// Intentionally not deleting the temp folder
}