HttpResponse::setBufferSize
HttpResponse::setCacheControl
The HttpResponse
PHP Manual

# HttpResponse::setCache

(PECL pecl_http >= 0.10.0)

HttpResponse::setCache — Set cache

### Opis

static bool HttpResponse::setCache ( bool `$cache` )

Whether it should be attempted to cache the entity.

This will result in necessary caching headers and checks of clients If-Modified-Since and If-None-Match headers. If one of those headers matches a 304 Not Modified status code will be issued.

> Informacja: If you're using sessions, be sure that you set session.cache_limiter to something more appropriate than "no-cache"!

### Parametry

`cache`

  whether caching should be attempted

### Zwracane wartości

Zwraca `TRUE` w przypadku powodzenia, `FALSE` w przypadku błędu.

### Zobacz też:

- HttpResponse::setCacheControl - Set cache control
- HttpResponse::getCacheControl - Get cache control
- HttpResponse::getCachel

HttpResponse::setBufferSize
HttpResponse::setCacheControl
The HttpResponse
PHP Manual