Skip to content

Commit 3b2fcc2

Browse files
committed
Added changelogs
1 parent 5c1a43e commit 3b2fcc2

File tree

4 files changed

+22
-9
lines changed

4 files changed

+22
-9
lines changed

Changelog.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
The change log describes what is "Added", "Removed", "Changed" or "Fixed" between each release.
44

5-
## UNRELEASED
5+
## 0.2.0
66

7+
### Added
78

9+
* Support for `TaggableCacheItemPoolInterface`
10+
11+
## 0.1.0
12+
13+
First release

EncryptedCachePool.php

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

1414
use Cache\Adapter\Common\PhpCachePool;
15+
use Cache\Adapter\Common\TaggableCacheItemInterface;
16+
use Cache\Taggable\TaggablePSR6PoolAdapter;
1517
use Defuse\Crypto\Key;
1618
use Psr\Cache\CacheItemInterface;
19+
use Psr\Cache\CacheItemPoolInterface;
1720

1821
/**
1922
* Wrapps a CacheItemInterface with EncryptedItemDecorator.
2023
*
2124
* @author Daniel Bannert <[email protected]>
2225
*/
23-
class EncryptedCachePool implements PhpCachePool
26+
class EncryptedCachePool implements TaggableCacheItemInterface
2427
{
2528
/**
26-
* @type PhpCachePool
29+
* @type TaggableCacheItemInterface
2730
*/
2831
private $cachePool;
2932

@@ -33,12 +36,12 @@ class EncryptedCachePool implements PhpCachePool
3336
private $key;
3437

3538
/**
36-
* @param PhpCachePool $cachePool
37-
* @param Key $key
39+
* @param CacheItemPoolInterface $cachePool
40+
* @param Key $key
3841
*/
39-
public function __construct(PhpCachePool $cachePool, Key $key)
42+
public function __construct(CacheItemPoolInterface $cachePool, Key $key)
4043
{
41-
$this->cachePool = $cachePool;
44+
$this->cachePool = TaggablePSR6PoolAdapter::makeTaggable($cachePool);
4245
$this->key = $key;
4346
}
4447

EncryptedItemDecorator.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
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;
@@ -21,7 +22,7 @@
2122
*
2223
* @author Daniel Bannert <[email protected]>
2324
*/
24-
class EncryptedItemDecorator implements PhpCacheItem
25+
class EncryptedItemDecorator implements TaggableCacheItemInterface
2526
{
2627
/**
2728
* @type PhpCacheItem
@@ -128,7 +129,9 @@ public function getPreviousTags()
128129
}
129130

130131
/**
131-
* {@inheritdoc}
132+
* Get the current tags. These are not the same tags as getPrevious tags.
133+
*
134+
* @return array
132135
*/
133136
public function getTags()
134137
{

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
"require": {
3131
"php": "^5.5 || ^7.0",
3232
"defuse/php-encryption": "^2.0",
33+
"cache/taggable-cache": "^0.5",
3334
"psr/cache": "^1.0"
3435
},
3536
"require-dev": {

0 commit comments

Comments
 (0)