|
DateTime | $dateCreated |
|
RequestInterface | $request |
|
ResponseInterface | $response |
|
DateTime | $staleAt |
|
DateTime | $staleIfErrorTo |
|
DateTime | $staleWhileRevalidateTo |
|
int | $timestampStale |
| Cached timestamp of staleAt variable.
|
|
◆ __construct()
Kevinrob\GuzzleCache\CacheEntry::__construct |
( |
RequestInterface | $request, |
|
|
ResponseInterface | $response, |
|
|
DateTime | $staleAt, |
|
|
DateTime | $staleIfErrorTo = null, |
|
|
DateTime | $staleWhileRevalidateTo = null ) |
- Parameters
-
RequestInterface | $request | |
ResponseInterface | $response | |
DateTime | $staleAt | |
DateTime | null | $staleIfErrorTo | if null, detected with the headers (RFC 5861) |
DateTime | null | $staleWhileRevalidateTo | |
◆ getAge()
Kevinrob\GuzzleCache\CacheEntry::getAge |
( |
| ) |
|
◆ getOriginalRequest()
Kevinrob\GuzzleCache\CacheEntry::getOriginalRequest |
( |
| ) |
|
◆ getOriginalResponse()
Kevinrob\GuzzleCache\CacheEntry::getOriginalResponse |
( |
| ) |
|
◆ getResponse()
Kevinrob\GuzzleCache\CacheEntry::getResponse |
( |
| ) |
|
◆ getStaleAge()
Kevinrob\GuzzleCache\CacheEntry::getStaleAge |
( |
| ) |
|
- Return values
-
int | positive value equal staled |
◆ getStaleAt()
Kevinrob\GuzzleCache\CacheEntry::getStaleAt |
( |
| ) |
|
◆ getTTL()
Kevinrob\GuzzleCache\CacheEntry::getTTL |
( |
| ) |
|
Time in seconds how long the entry should be kept in the cache.
This will not give the time (in seconds) that the response will still be fresh for from the HTTP point of view, but an upper bound on how long it is necessary and reasonable to keep the response in a cache (to re-use it or re-validate it later on).
- Return values
-
int | TTL in seconds (0 = infinite) |
◆ getVaryHeaders()
Kevinrob\GuzzleCache\CacheEntry::getVaryHeaders |
( |
| ) |
|
Get the vary headers that should be honoured by the cache.
- Return values
-
◆ hasValidationInformation()
Kevinrob\GuzzleCache\CacheEntry::hasValidationInformation |
( |
| ) |
|
◆ isFresh()
Kevinrob\GuzzleCache\CacheEntry::isFresh |
( |
| ) |
|
◆ isStale()
Kevinrob\GuzzleCache\CacheEntry::isStale |
( |
| ) |
|
◆ isVaryEquals()
◆ serveStaleIfError()
Kevinrob\GuzzleCache\CacheEntry::serveStaleIfError |
( |
| ) |
|
◆ staleWhileValidate()
Kevinrob\GuzzleCache\CacheEntry::staleWhileValidate |
( |
| ) |
|
The documentation for this class was generated from the following file:
- lib/guzzlehttp/kevinrob/guzzlecache/src/CacheEntry.php