Skip to content

Commit ae17bbb

Browse files
committed
Tagging bugfix and updated tests to ^0.9
1 parent 737e630 commit ae17bbb

File tree

2 files changed

+33
-3
lines changed

2 files changed

+33
-3
lines changed

RedisCachePool.php

+30
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ public function __construct(\Redis $cache)
4040
$this->cache = $cache;
4141
}
4242

43+
/**
44+
* {@inheritdoc}
45+
*/
4346
protected function fetchObjectFromCache($key)
4447
{
4548
if (false === $result = unserialize($this->cache->get($this->getHierarchyKey($key)))) {
@@ -49,11 +52,17 @@ protected function fetchObjectFromCache($key)
4952
return $result;
5053
}
5154

55+
/**
56+
* {@inheritdoc}
57+
*/
5258
protected function clearAllObjectsFromCache()
5359
{
5460
return $this->cache->flushDb();
5561
}
5662

63+
/**
64+
* {@inheritdoc}
65+
*/
5766
protected function clearOneObjectFromCache($key)
5867
{
5968
$this->commit();
@@ -65,6 +74,9 @@ protected function clearOneObjectFromCache($key)
6574
return $this->cache->del($keyString) >= 0;
6675
}
6776

77+
/**
78+
* {@inheritdoc}
79+
*/
6880
protected function storeItemInCache(CacheItemInterface $item, $ttl)
6981
{
7082
$key = $this->getHierarchyKey($item->getKey());
@@ -76,6 +88,9 @@ protected function storeItemInCache(CacheItemInterface $item, $ttl)
7688
return $this->cache->setex($key, $ttl, $data);
7789
}
7890

91+
/**
92+
* {@inheritdoc}
93+
*/
7994
public function save(CacheItemInterface $item)
8095
{
8196
if ($item instanceof TaggableItemInterface) {
@@ -85,26 +100,41 @@ public function save(CacheItemInterface $item)
85100
return parent::save($item);
86101
}
87102

103+
/**
104+
* {@inheritdoc}
105+
*/
88106
protected function getValueFormStore($key)
89107
{
90108
return $this->cache->get($key);
91109
}
92110

111+
/**
112+
* {@inheritdoc}
113+
*/
93114
protected function appendListItem($name, $value)
94115
{
95116
$this->cache->lPush($name, $value);
96117
}
97118

119+
/**
120+
* {@inheritdoc}
121+
*/
98122
protected function getList($name)
99123
{
100124
return $this->cache->lRange($name, 0, -1);
101125
}
102126

127+
/**
128+
* {@inheritdoc}
129+
*/
103130
protected function removeList($name)
104131
{
105132
return $this->cache->del($name);
106133
}
107134

135+
/**
136+
* {@inheritdoc}
137+
*/
108138
protected function removeListItem($name, $key)
109139
{
110140
return $this->cache->lrem($name, $key, 0);

composer.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@
2828
"php": "^5.5|^7.0",
2929
"ext-redis": "*",
3030
"psr/cache": "^1.0",
31-
"cache/adapter-common": "^0.2",
32-
"cache/taggable-cache": "^0.3",
31+
"cache/adapter-common": "^0.3",
32+
"cache/taggable-cache": "^0.4",
3333
"cache/hierarchical-cache": "^0.2"
3434
},
3535
"require-dev": {
3636
"phpunit/phpunit": "^4.0|^5.1",
37-
"cache/integration-tests": "0.9.0"
37+
"cache/integration-tests": "^0.9"
3838
},
3939
"provide": {
4040
"psr/cache-implementation": "^1.0"

0 commit comments

Comments
 (0)