Bluz\Http\CacheControl
HTTP Cache Control
Wrapper for working with HTTP headers
- Cache-Control
- Last-Modified
- Expires
- ETag
- Age
- Author: Anton Shevchuk
Synopsis
- // members
- protected Response $response;
- // methods
- public void __construct()
- protected void updateCacheControlHeader()
- public void setPrivate()
- public void setPublic()
- public integer getMaxAge()
- public void setMaxAge()
- public void setSharedMaxAge()
- public integer|null getTtl()
- public void setTtl()
- public void setClientTtl()
- public string getEtag()
- public void setEtag()
- public integer getAge()
- public void setAge()
- public string getExpires()
- public void setExpires()
- public string getLastModified()
- public void setLastModified()
- public void expire()
- // Inherited methods from Container
- protected void doSetContainer()
- protected mixed doGetContainer()
- protected bool doContainsContainer()
- protected void doDeleteContainer()
- public Container setFromArray()
- public array toArray()
- public Container resetArray()
Hierarchy
Members
protected
- $container — array
- $response — Bluz\Response\Response
Methods
protected
- updateCacheControlHeader() — Prepare Cache-Control header
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".
- setTtl() — Sets the response's time-to-live for shared caches.
Inherited from Bluz\Common\Container\Container
protected
- doContainsContainer() — Check contains key in container
- doDeleteContainer() — Delete value by key
- doGetContainer() — Get value by key
- doSetContainer() — Set key/value pair
public
- resetArray() — Reset container array
- setFromArray() — Sets all data in the row from an array
- toArray() — Returns the column/value data as an array
History
-
2017-06-30T08:36:40+00:00 (commit #2259ecf)
Author: Anton Shevchuk (AntonShevchuk@gmail.com) / Commiter: Anton Shevchuk (AntonShevchuk@gmail.com)
Fixed comments style
-
2017-04-21T15:14:44+00:00 (commit #c7538da)
Author: Anton Shevchuk (AntonShevchuk@gmail.com) / Commiter: Anton Shevchuk (AntonShevchuk@gmail.com)
Replace `sizeof` to `count`
-
2017-04-21T13:24:35+00:00 (commit #3b25a3d)
Author: Anton Shevchuk (AntonShevchuk@gmail.com) / Commiter: Anton Shevchuk (AntonShevchuk@gmail.com)
Small update for codestyle
-
2017-04-14T13:18:07+00:00 (commit #cdb67f1)
Author: Anton Shevchuk (AntonShevchuk@gmail.com) / Commiter: Anton Shevchuk (AntonShevchuk@gmail.com)
Added tests for CacheControl
-
2017-02-15T16:09:44+00:00 (commit #0fc0c8b)
Author: Anton Shevchuk (AntonShevchuk@gmail.com) / Commiter: Anton Shevchuk (AntonShevchuk@gmail.com)
Updated coveralls config
-
2017-02-13T10:14:18+00:00 (commit #43dbf55)
Author: Anton Shevchuk (AntonShevchuk@gmail.com) / Commiter: Anton Shevchuk (AntonShevchuk@gmail.com)
Rollback to `getCount()` method
-
2017-01-30T13:15:49+00:00 (commit #fd5d943)
Author: Anton (AntonShevchuk@gmail.com) / Commiter: GitHub (AntonShevchuk@gmail.com)
Merge pull request #395 from AntonShevchuk/master Added `AttachmentResponse`
-
2017-01-30T12:38:53+00:00 (commit #0ab8691)
Author: Anton Shevchuk (AntonShevchuk@gmail.com) / Commiter: Anton Shevchuk (AntonShevchuk@gmail.com)
Added `AttachmentResponse` Added `attachment($file)` helper for `Controller`