Moodle PHP Documentation 5.1
Moodle 5.1dev (Build: 20250711) (9addea9f0ac)
|
Public Member Functions | ||||||
__construct (?CacheStorageInterface $cache=null, $defaultTtl=60, ?KeyValueHttpHeader $varyHeaders=null,) | ||||||
cache (RequestInterface $request, ResponseInterface $response) | ||||||
delete (RequestInterface $request) | ||||||
{{
| ||||||
fetch (RequestInterface $request) | ||||||
Return a CacheEntry or null if no cache. | ||||||
update (RequestInterface $request, ResponseInterface $response) | ||||||
Public Attributes | |
const | HEADER_TTL = 'X-Kevinrob-GuzzleCache-TTL' |
Protected Member Functions | |
getCacheKey (RequestInterface $request, ?KeyValueHttpHeader $varyHeaders=null) | |
Generate a key for the response cache. | |
getCacheObject (RequestInterface $request, ResponseInterface $response) | |
Protected Attributes | |
string[] | $ageKey |
int | $defaultTtl |
int[] | $statusAccepted |
CacheStorageInterface | $storage |
Kevinrob\GuzzleCache\Strategy\GreedyCacheStrategy::cache | ( | RequestInterface | $request, |
ResponseInterface | $response ) |
RequestInterface | $request | |
ResponseInterface | $response |
bool | true if success |
Reimplemented from Kevinrob\GuzzleCache\Strategy\PrivateCacheStrategy.
Kevinrob\GuzzleCache\Strategy\GreedyCacheStrategy::delete | ( | RequestInterface | $request | ) |
{{
RequestInterface | $request |
bool |
Reimplemented from Kevinrob\GuzzleCache\Strategy\PrivateCacheStrategy.
Kevinrob\GuzzleCache\Strategy\GreedyCacheStrategy::fetch | ( | RequestInterface | $request | ) |
Return a CacheEntry or null if no cache.
RequestInterface | $request |
CacheEntry|null |
Reimplemented from Kevinrob\GuzzleCache\Strategy\PrivateCacheStrategy.
|
protected |
Generate a key for the response cache.
RequestInterface | $request | |
null | KeyValueHttpHeader | $varyHeaders | The vary headers which should be honoured by the cache (optional) |
string |
Reimplemented from Kevinrob\GuzzleCache\Strategy\PrivateCacheStrategy.
|
protected |
RequestInterface | $request | |
ResponseInterface | $response |
CacheEntry|null | entry to save, null if can't cache it |
Reimplemented from Kevinrob\GuzzleCache\Strategy\PrivateCacheStrategy.
|
inherited |
RequestInterface | $request | |
ResponseInterface | $response |
bool | true if success |
Implements Kevinrob\GuzzleCache\Strategy\CacheStrategyInterface.
|
protectedinherited |
|
protectedinherited |