mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR: Speed up cache test (1s is as good a test expiry as 8s) (from r98433)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102657 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
9c0c2cad7a
commit
6e284c2914
@ -19,14 +19,14 @@ class CacheTest extends SapphireTest {
|
||||
}
|
||||
|
||||
function testCacheLifetime() {
|
||||
SS_Cache::set_cache_lifetime('test', 4, 20);
|
||||
SS_Cache::set_cache_lifetime('test', 0.5, 20);
|
||||
|
||||
$cache = SS_Cache::factory('test');
|
||||
|
||||
$cache->save('Good', 'cachekey');
|
||||
$this->assertEquals('Good', $cache->load('cachekey'));
|
||||
|
||||
sleep(8);
|
||||
sleep(1);
|
||||
|
||||
$this->assertFalse($cache->load('cachekey'));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user