function CacheItemPoolInterface::getItem
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.
Return value
CacheItemInterface The corresponding Cache Item.
Throws
InvalidArgumentException If the $key string is not a legal value a \Psr\Cache\InvalidArgumentException MUST be thrown.
File
-
vendor/
psr/ cache/ src/ CacheItemPoolInterface.php, line 32
Class
- CacheItemPoolInterface
- CacheItemPoolInterface generates CacheItemInterface objects.
Namespace
Psr\CacheCode
public function getItem(string $key) : CacheItemInterface;