[Cache] Drop TaggedCacheItemInterface

This commit is contained in:
Nicolas Grekas 2016-08-03 08:54:03 +02:00
parent e408b50c5a
commit 624890b14e
2 changed files with 9 additions and 36 deletions

View File

@ -11,13 +11,14 @@
namespace Symfony\Component\Cache;
use Psr\Cache\CacheItemInterface;
use Psr\Log\LoggerInterface;
use Symfony\Component\Cache\Exception\InvalidArgumentException;
/**
* @author Nicolas Grekas <p@tchwork.com>
*/
final class CacheItem implements TaggedCacheItemInterface
final class CacheItem implements CacheItemInterface
{
protected $key;
protected $value;
@ -97,7 +98,13 @@ final class CacheItem implements TaggedCacheItemInterface
}
/**
* {@inheritdoc}
* Adds a tag to a cache item.
*
* @param string|string[] $tags A tag or array of tags
*
* @return static
*
* @throws InvalidArgumentException When $tag is not valid.
*/
public function tag($tags)
{

View File

@ -1,34 +0,0 @@
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Cache;
use Psr\Cache\CacheItemInterface;
use Psr\Cache\InvalidArgumentException;
/**
* Interface for adding tags to cache items.
*
* @author Nicolas Grekas <p@tchwork.com>
*/
interface TaggedCacheItemInterface extends CacheItemInterface
{
/**
* Adds a tag to a cache item.
*
* @param string|string[] $tags A tag or array of tags
*
* @return static
*
* @throws InvalidArgumentException When $tag is not valid.
*/
public function tag($tags);
}