/usr/share/doc/php-cache-lite/tests/Cache_Lite_memorycache.phpt is in php-cache-lite 1.7.4-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 52 | --TEST--
Cache_Lite::Cache_Lite (memory cache on)
--FILE--
<?php
require_once('callcache.inc');
require_once('tmpdir.inc');
require_once('cache_lite_base.inc');
$options = array(
'cacheDir' => tmpDir() . '/',
'lifeTime' => 60,
'memoryCaching' => false
);
$Cache_Lite = new Cache_Lite($options);
multipleCallCache();
?>
--GET--
--POST--
--EXPECT--
==> First call (cache should be missed)
Cache Missed !
0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
Done !
==> Second call (cache should be hit)
Cache Hit !
0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
Done !
==> Third call (cache should be hit)
Cache Hit !
0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
Done !
==> We remove cache
Done !
==> Fourth call (cache should be missed)
Cache Missed !
0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
Done !
==> #5 Call with another id (cache should be missed)
Cache Missed !
0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
Done !
==> We remove cache
Done !
|