Bluz\Http\CacheControl

HTTP Cache Control

Wrapper for working with HTTP headers
- Cache-Control
- Last-Modified
- Expires
- ETag
- Age

Synopsis

class CacheControl {
}

Hierarchy

Members

protected

Methods

protected

public

  • __construct() — Create instance
  • expire() — Marks the response stale by setting the Age header to be equal to the maximum age of the response
  • getAge() — Returns the age of the response
  • getEtag() — Returns the literal value of the ETag HTTP header
  • getExpires() — Returns the value of the Expires header as a DateTime instance
  • getLastModified() — Returns the Last-Modified HTTP header as a string
  • getMaxAge() — Returns the number of seconds after the time specified in the response's Date header when the response should no longer be considered fresh.
  • getTtl() — Returns the response's time-to-live in seconds.
  • setAge() — Set the age of the response
  • setClientTtl() — Sets the response's time-to-live for private/client caches.
  • setEtag() — Sets the ETag value
  • setExpires() — Sets the Expires HTTP header with a DateTime instance
  • setLastModified() — Sets the Last-Modified HTTP header with a DateTime instance or string
  • setMaxAge() — Sets the number of seconds after which the response should no longer be considered fresh.
  • setPrivate() — Marks the response as "private".
  • setPublic() — Marks the response as "public".
  • setSharedMaxAge() — Sets the number of seconds after which the response should no longer be considered fresh by shared caches.
  • setTtl() — Sets the response's time-to-live for shared caches.

Inherited from Bluz\Common\Container\Container

protected

public

History