getItem()
getItem(string $key) : \Psr\Cache\CacheItemInterface
Returns a Cache Item representing the specified key.
This method must always return a CacheItemInterface object, even in case of a cache miss. It MUST NOT return null.
Parameters
string | $key | The key for which to return the corresponding Cache Item. |
Throws
- \Psr\Cache\InvalidArgumentException
If the $key string is not a legal value a \Psr\Cache\InvalidArgumentException MUST be thrown.
Returns
\Psr\Cache\CacheItemInterface —The corresponding Cache Item.