/
Cache_Lite_Output_classical.phpt
51 lines (36 loc) · 1.24 KB
/
Cache_Lite_Output_classical.phpt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
--TEST--
Cache_Lite::Cache_Lite_Output (classical)
--INI--
track_errors=Off
--FILE--
<?php
require_once __DIR__ . '/callcache.inc';
require_once __DIR__ . '/tmpdir.inc';
require_once __DIR__ . '/cache_lite_output_base.inc';
$options = array(
'cacheDir' => tmpDir() . '/',
'lifeTime' => 60
);
$Cache_Lite_Output = new Cache_Lite_Output($options);
multipleCallCache2();
?>
--EXPECT--
==> First call (cache should be missed)
0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789Cache Missed !
Done !
==> Second call (cache should be hit)
0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789Cache Hit !
Done !
==> Third call (cache should be hit)
0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789Cache Hit !
Done !
==> We remove cache
Done !
==> Fourth call (cache should be missed)
0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789Cache Missed !
Done !
==> #5 Call with another id (cache should be missed)
0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789Cache Missed !
Done !
==> We remove cache
Done !