Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
--TEST--
2
pearbug7618
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 = new Cache_Lite($options);
17
$cacheid = "testid";
18
$tmpar = array();
19
for ($i=0; $i<2; $i++) {
20
    $ar[] = 'foo';
21
    if ($cache->save($ar,$cacheid)) {
22
        echo "TRUE\n";
23
    } else {
24
        echo "FALSE\n";
25
    }
26
    if ($data = $cache->get($cacheid)) {
27
        echo($data[0] . "\n");
28
    } else {
29
        echo "FALSE\n";
30
    }
31
}
32
$cache->remove('testid');
33
 
34
?>
35
--EXPECT--
36
TRUE
37
foo
38
TRUE
39
foo