Forum und email

HttpResponse::setCacheControl

(PECL pecl_http:0.10.0-1.5.5)

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 が publicprivate あるいは no-cache のいずれかでない場合に FALSE を返します。

参考

  • HttpResponse::getCacheControl()
  • HttpResponse::setCache()
  • HttpResponse::getCache()