Skip to content

Commit 402005b

Browse files
committed
Tagging bugfix and updated tests to ^0.9
1 parent 195ae18 commit 402005b

File tree

2 files changed

+30
-3
lines changed

2 files changed

+30
-3
lines changed

FilesystemCachePool.php

+27
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ public function __construct(Filesystem $filesystem)
4343
$this->filesystem->createDir(self::CACHE_PATH);
4444
}
4545

46+
/**
47+
* {@inheritdoc}
48+
*/
4649
protected function fetchObjectFromCache($key)
4750
{
4851
$file = $this->getFilePath($key);
@@ -63,6 +66,9 @@ protected function fetchObjectFromCache($key)
6366
return [true, $data[1], $data[2]];
6467
}
6568

69+
/**
70+
* {@inheritdoc}
71+
*/
6672
protected function clearAllObjectsFromCache()
6773
{
6874
$this->filesystem->deleteDir(self::CACHE_PATH);
@@ -71,13 +77,19 @@ protected function clearAllObjectsFromCache()
7177
return true;
7278
}
7379

80+
/**
81+
* {@inheritdoc}
82+
*/
7483
protected function clearOneObjectFromCache($key)
7584
{
7685
$this->preRemoveItem($key);
7786

7887
return $this->forceClear($key);
7988
}
8089

90+
/**
91+
* {@inheritdoc}
92+
*/
8193
protected function storeItemInCache(CacheItemInterface $item, $ttl)
8294
{
8395
$file = $this->getFilePath($item->getKey());
@@ -113,6 +125,9 @@ private function getFilePath($key)
113125
return sprintf('%s/%s', self::CACHE_PATH, $key);
114126
}
115127

128+
/**
129+
* {@inheritdoc}
130+
*/
116131
public function save(CacheItemInterface $item)
117132
{
118133
if ($item instanceof TaggableItemInterface) {
@@ -122,6 +137,9 @@ public function save(CacheItemInterface $item)
122137
return parent::save($item);
123138
}
124139

140+
/**
141+
* {@inheritdoc}
142+
*/
125143
protected function getList($name)
126144
{
127145
$file = $this->getFilePath($name);
@@ -133,12 +151,18 @@ protected function getList($name)
133151
return unserialize($this->filesystem->read($file));
134152
}
135153

154+
/**
155+
* {@inheritdoc}
156+
*/
136157
protected function removeList($name)
137158
{
138159
$file = $this->getFilePath($name);
139160
$this->filesystem->delete($file);
140161
}
141162

163+
/**
164+
* {@inheritdoc}
165+
*/
142166
protected function appendListItem($name, $key)
143167
{
144168
$list = $this->getList($name);
@@ -147,6 +171,9 @@ protected function appendListItem($name, $key)
147171
return $this->filesystem->update($this->getFilePath($name), serialize($list));
148172
}
149173

174+
/**
175+
* {@inheritdoc}
176+
*/
150177
protected function removeListItem($name, $key)
151178
{
152179
$list = $this->getList($name);

composer.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@
2626
"require": {
2727
"php": "^5.5|^7.0",
2828
"psr/cache": "^1.0",
29-
"cache/adapter-common": "^0.2",
30-
"cache/taggable-cache": "^0.3",
29+
"cache/adapter-common": "^0.3",
30+
"cache/taggable-cache": "^0.4",
3131
"league/flysystem": "^1.0"
3232
},
3333
"require-dev": {
3434
"phpunit/phpunit": "^4.0|^5.1",
35-
"cache/integration-tests": "0.9.0"
35+
"cache/integration-tests": "^0.9"
3636
},
3737
"provide": {
3838
"psr/cache-implementation": "^1.0"

0 commit comments

Comments
 (0)