« Yac::dump
Yac::get »

Yac::flush

(PECL yac >= 1.0.0)

Yac::flush — Flush the cache

説明

public function Yac::flush(): bool

Removes all cached values. Because the cache is shared by every process of the same machine, this empties the cache globally; the key prefix given to Yac::__construct() does not limit what gets flushed.

パラメータ

この関数にはパラメータはありません。

戻り値

Returns true.

例

例1 Yac::flush() example

<?php
$yac = new Yac();
$yac->set("foo", "bar");

$other = new Yac("app2_");
$other->set("baz", "qux");

// flush empties the whole cache: entries of every instance,
// regardless of the prefix used when they were stored
$yac->flush();

var_dump($yac->get("foo"));   // bool(false)
var_dump($other->get("baz")); // bool(false)
?>

参考

関連キーワード:
cache   flush   Flush   dump   empties   prefix   Removes   cached   values   Because   shared   process   machine   globally   given   construct   limit   what   gets   flushed   example   whole   entries   instance   regardless
関連する関数・ページ:
class.yac   book.yac   function.realpath-cache-size   yac.construct   ref.rar   yac.get