Cache_Lite_Function::drop() -- Drop a cache file
Описание
[since Cache_Lite 1.6.0beta1] Drop the cache file of the corresponding function call with given arguments.
Возвращаемое значение
returns true if ok
Заметка
Эта функция не должна вызываться статически.
Пример
Пример 32-1. classical using with a function
<?php
require_once('Cache/Lite/Function.php');
$options = array(
'cacheDir' => '/tmp/',
'lifeTime' => 3600
);
$cache = new Cache_Lite_Function($options);
$cache->call('function_to_bench', 12,45);
$cache->call('function_to_bench', 12,45);
// clean the corresponding cache file
$cache->drop('function_to_bench', 12, 45);
function function_to_bench($arg1, $arg2)
{
echo "This is the output of the function function_to_bench($arg1, $arg2) !<br>";
return "This is the result of the function function_to_bench($arg1, $arg2) !<br>";
}
?> |
|