Skip to content

Commit 361b58a

Browse files
committed
Updated interfaces
1 parent 4fc25bd commit 361b58a

File tree

2 files changed

+33
-2
lines changed

2 files changed

+33
-2
lines changed

EncryptedCachePool.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,4 +141,11 @@ public function invalidateTags(array $tags)
141141
{
142142
return $this->cachePool->invalidateTags($tags);
143143
}
144+
/**
145+
* {@inheritdoc}
146+
*/
147+
public function invalidateTag($tag)
148+
{
149+
return $this->cachePool->invalidateTag($tag);
150+
}
144151
}

EncryptedItemDecorator.php

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@
1212
namespace Cache\Encryption;
1313

1414
use Cache\Adapter\Common\PhpCacheItem;
15+
use Cache\Adapter\Common\TaggableCacheItemInterface;
1516
use Defuse\Crypto\Crypto;
1617
use Defuse\Crypto\Key;
1718
use Psr\Cache\CacheItemInterface;
19+
use Psr\Cache\InvalidArgumentException;
1820

1921
/**
2022
* Encrypt and Decrypt all the stored items.
@@ -127,13 +129,35 @@ public function getTags()
127129
return $this->cacheItem->getTags();
128130
}
129131

130-
public function tag($tags)
132+
/**
133+
* {@inheritdoc}
134+
*/
135+
public function setTags(array $tags)
136+
{
137+
$this->cacheItem->setTags($tags);
138+
139+
return $this;
140+
}
141+
142+
/**
143+
* {@inheritdoc}
144+
*/
145+
public function addTag($tag)
131146
{
132-
$this->cacheItem->tag($tags);
147+
$this->cacheItem->addTag($tag);
148+
return $this;
149+
}
133150

151+
/**
152+
* {@inheritdoc}
153+
*/
154+
public function addTags(array $tags)
155+
{
156+
$this->cacheItem->addTags($tags);
134157
return $this;
135158
}
136159

160+
137161
/**
138162
* Creating a copy of the orginal CacheItemInterface object.
139163
*/

0 commit comments

Comments
 (0)