| Server IP : 217.160.0.95 / Your IP : 216.73.216.242 Web Server : Apache System : Linux infong-uk56 4.4.400-icpu-108 #2 SMP Wed Feb 11 11:51:01 UTC 2026 x86_64 User : u78863098 ( 10368940) PHP Version : 8.4.24 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /usr/lib/php8.4/test/Cache_Lite/tests/ |
Upload File : |
--TEST--
Cache_Lite::Cache_Lite_Function (drop() method)
--INI--
track_errors=Off
--FILE--
<?php
require_once __DIR__ . '/callcache.inc';
require_once __DIR__ . '/tmpdir.inc';
require_once __DIR__ . '/cache_lite_function_base.inc';
$options = array(
'cacheDir' => tmpDir() . '/',
'lifeTime' => 60
);
$foo = 10;
$cache = new Cache_Lite_Function($options);
$data = $cache->call('function_to_bench', 23, 66);
echo($data."\n");
$data = $cache->call('function_to_bench', 23, 66);
echo($data."\n");
$cache->drop('function_to_bench', 23, 66);
$data = $cache->call('function_to_bench', 23, 66);
echo($data."\n");
$data = $cache->call('function_to_bench', 23, 66);
echo($data."\n");
$cache->clean();
function function_to_bench($arg1, $arg2)
{
global $foo;
$foo = $foo + 1;
echo "hello !\n";
return($foo + $arg1 + $arg2);
}
?>
--GET--
--POST--
--EXPECT--
hello !
100
hello !
100
hello !
101
hello !
101