HttpResponse::setCacheControl
(PECL pecl_http >= 0.10.0)
HttpResponse::setCacheControl — cache control を設定する
説明
static
bool HttpResponse::setCacheControl
( string $control
[, int $max_age = 0
[, bool $must_revalidate = true
]] )
Cache-Control ヘッダを定義します。 通常は private または public です。
パラメータ
- control
-
キャッシュコントロール設定。
- max_age
-
max-age の秒数。これは、クライアント側での キャッシュエントリの有効期限を表します。
- must_revalidate
-
クライアント側でのキャッシュエントリの再検証を、 リクエストのたびに行うかどうかを指定します。
返り値
成功した場合に TRUE、control が public、 private あるいは no-cache のいずれかでない場合に FALSE を返します。
参考
- HttpResponse::getCacheControl() - cache control を取得する
- HttpResponse::setCache() - キャッシュを設定する
- HttpResponse::getCache() - キャッシュを取得する
HttpResponse::setCacheControl
There are no user contributed notes for this page.
