Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
--TEST--
2
Cache_Lite::Cache_Lite (lifetime)
3
--FILE--
4
<?php
5
 
6
require_once('callcache.inc');
7
require_once('tmpdir.inc');
8
require_once('cache_lite_base.inc');
9
 
10
$options = array(
11
    'cacheDir' => tmpDir() . '/',
12
    'lifeTime' => 2
13
);
14
 
15
$Cache_Lite = new Cache_Lite($options);
16
callCache('31415926');
17
echo("\n");
18
callCache('31415926');
19
echo("\n");
20
sleep(4);
21
callCache('31415926');
22
echo("\n");
23
sleep(4);
24
$Cache_Lite->extendLife();
25
callCache('31415926');
26
echo("\n");
27
$Cache_Lite->remove('31415926');
28
 
29
?>
30
--GET--
31
--POST--
32
--EXPECT--
33
Cache Missed !
34
0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
35
Cache Hit !
36
0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
37
Cache Missed !
38
0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
39
Cache Hit !
40
0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789