PHP Class Kevinrob\GuzzleCache\Storage\Psr6CacheStorage

Inheritance: implements Kevinrob\GuzzleCache\Storage\CacheStorageInterface
Show file Open project: kevinrob/guzzle-cache-middleware

Protected Properties

Property Type Description
$cachePool Psr\Cache\CacheItemPoolInterface The cache pool.
$lastItem Psr\Cache\CacheItemInterface | null This item is transiently stored so that save() can reuse the cache item usually retrieved by fetch() beforehand, instead of requesting it a second time.

Public Methods

Method Description
__construct ( Psr\Cache\CacheItemPoolInterface $cachePool )
fetch ( $key )
save ( $key, CacheEntry $data )

Method Details

__construct() public method

public __construct ( Psr\Cache\CacheItemPoolInterface $cachePool )
$cachePool Psr\Cache\CacheItemPoolInterface

fetch() public method

public fetch ( $key )

save() public method

public save ( $key, CacheEntry $data )
$data Kevinrob\GuzzleCache\CacheEntry

Property Details

$cachePool protected property

The cache pool.
protected CacheItemPoolInterface,Psr\Cache $cachePool
return Psr\Cache\CacheItemPoolInterface

$lastItem protected property

This item is transiently stored so that save() can reuse the cache item usually retrieved by fetch() beforehand, instead of requesting it a second time.
protected CacheItemInterface,Psr\Cache|null $lastItem
return Psr\Cache\CacheItemInterface | null