HttpResponse::setCache
(PECL pecl_http >= 0.10.0)
HttpResponse::setCache — Establecer caché
Descripción
static
bool HttpResponse::setCache
( bool
$cache
)Indica si se debe o no cachear la entidad.
Generará las cabeceras y comprobaciones necesarias para el cliente, If-Modified-Since y If-None-Match. Si una de estas cabeceras coincidiera, se devolvería un código de estado 304 Not Modified.
Nota:
Si está usando sesiones, asegúrese de que session.cache_limiter contiene un valor más apropiado que "no-cache".
Parámetros
-
cache -
indica si se debe cachear o no
Valores devueltos
Devuelve TRUE en caso de éxito o FALSE en caso de error.
Ver también
- HttpResponse::setCacheControl() - Establecer Cache-Control
- HttpResponse::getCacheControl() - Consultar Cache-Control
- HttpResponse::getCachel()