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 (automatic serialization on)
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' => 60,
13
    'automaticSerialization' => true
14
);
15
 
16
$Cache_Lite = new Cache_Lite($options);
17
multipleCallCache('array');
18
 
19
?>
20
--GET--
21
--POST--
22
--EXPECT--
23
==> First call (cache should be missed)
24
Cache Missed !
25
a:4:{i:0;a:2:{i:0;s:3:"foo";i:1;s:3:"bar";}i:1;i:1;i:2;s:3:"foo";i:3;s:3:"bar";}
26
Done !
27
 
28
==> Second call (cache should be hit)
29
Cache Hit !
30
a:4:{i:0;a:2:{i:0;s:3:"foo";i:1;s:3:"bar";}i:1;i:1;i:2;s:3:"foo";i:3;s:3:"bar";}
31
Done !
32
 
33
==> Third call (cache should be hit)
34
Cache Hit !
35
a:4:{i:0;a:2:{i:0;s:3:"foo";i:1;s:3:"bar";}i:1;i:1;i:2;s:3:"foo";i:3;s:3:"bar";}
36
Done !
37
 
38
==> We remove cache
39
Done !
40
 
41
==> Fourth call (cache should be missed)
42
Cache Missed !
43
a:4:{i:0;a:2:{i:0;s:3:"foo";i:1;s:3:"bar";}i:1;i:1;i:2;s:3:"foo";i:3;s:3:"bar";}
44
Done !
45
 
46
==> #5 Call with another id (cache should be missed)
47
Cache Missed !
48
a:4:{i:0;a:2:{i:0;s:3:"foo";i:1;s:3:"bar";}i:1;i:1;i:2;s:3:"foo";i:3;s:3:"bar";}
49
Done !
50
 
51
==> We remove cache
52
Done !