downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

HttpResponse::setCacheControl> <HttpResponse::setBufferSize
[edit] Last updated: Fri, 25 May 2012

view this page in

HttpResponse::setCache

(PECL pecl_http >= 0.10.0)

HttpResponse::setCacheキャッシュを設定する

説明

static bool HttpResponse::setCache ( bool $cache )

エンティティのキャッシュを試みるかどうかを設定します。

これは、必要なキャッシュヘッダを設定したうえで、クライアントの If-Modified-Since および If-None-Match ヘッダを調べます。これらのヘッダのいずれかにマッチした場合、 ステータスコード 304 Not Modified が発行されます。

注意:

セッションを使用している場合は、session.cache_limiter の設定を "no-cache" 以外の適切な値にしておきましょう!

パラメータ

cache

キャッシュを試みるかどうか。

返り値

成功した場合に TRUE を、失敗した場合に FALSE を返します。

参考



add a note add a note User Contributed Notes HttpResponse::setCache
There are no user contributed notes for this page.

 
show source | credits | stats | sitemap | contact | advertising | mirror sites