メインコンテンツまでスキップ
Version: Fegg 5.x

Cache::delete

1つの値を削除します

説明​

public static void Cache::delete( string $key )

$keyのファイルを削除します。ファイルがなければ何もしません。

引数​

名前データ型デフォルト備考
$keystring値の名前

例​

CMS controller
use Fegg\Tool\Cache;

public function update($id)
{
$this->requirePost();
// ... save the post
Cache::delete('news-latest'); // the top page shows the new post at once
$this->redirect($this->page['prefix'] . '/index/UPDATED');
}