CacheItem
class CacheItem implements CacheItemInterface
Methods
| getKey() {@inheritdoc} | ||
| get() {@inheritdoc} | ||
| isHit() {@inheritdoc} | ||
| set($value) {@inheritdoc} | ||
| expiresAt($expiration) {@inheritdoc} | ||
| expiresAfter($time) {@inheritdoc} | ||
| CacheItem | tag(string|string[] $tags) Adds a tag to a cache item. | |
| static | validateKey(string $key) Validates a cache key according to PSR-6. | |
| static | log(LoggerInterface $logger = null, $message, $context = array()) Internal logging helper. |
Details
getKey()
{@inheritdoc}
get()
{@inheritdoc}
isHit()
{@inheritdoc}
set($value)
{@inheritdoc}
Parameters
| $value |
expiresAt($expiration)
{@inheritdoc}
Parameters
| $expiration |
expiresAfter($time)
{@inheritdoc}
Parameters
| $time |
CacheItem tag(string|string[] $tags)
Adds a tag to a cache item.
Parameters
| string|string[] | $tags | A tag or array of tags |
Return Value
| CacheItem |
Exceptions
| InvalidArgumentException | When $tag is not valid |
static validateKey(string $key)
Validates a cache key according to PSR-6.
Parameters
| string | $key | The key to validate |
Exceptions
| InvalidArgumentException | When $key is not valid |
static log(LoggerInterface $logger = null, $message, $context = array())
Internal logging helper.
Parameters
| LoggerInterface | $logger | |
| $message | ||
| $context |
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/3.2/Symfony/Component/Cache/CacheItem.html