Cache::delete
1つの値を削除します
説明
public static void Cache::delete( string $key )
$keyのファイルを削除します。ファイルがなければ何もしません。
引数
| 名前 | データ型 | デフォルト | 備考 |
|---|---|---|---|
| $key | string | 値の名前 |
例
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');
}