Cache_Lite_Function::drop

Cache_Lite_Function::drop() – キャッシュファイルを削除する

Synopsis

require_once 'Cache/Lite/Function.php';

boolean Cache_Lite_Function::drop ( string$functionName , mixed$arg1 , mixed$arg2 , mixed$arg3 , mixed... )

Description

[Cache_Lite 1.6.0beta1 以降] 指定した引数による関数コールに対応するキャッシュファイルを削除します。

Return value

returns 成功した場合に true を返します。

Note

This function can not be called statically.

Example

関数の標準的な使用法

<?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);

// 対応するキャッシュファイルを削除します
$cache->drop('function_to_bench'1245);

function 
function_to_bench($arg1$arg2
{
    echo 
"これは、関数 function_to_bench($arg1$arg2) の出力です!<br>";
    return 
"これは、関数 function_to_bench($arg1$arg2) の返り値です!<br>";
}

?>