Skip to content

Commit

Permalink
Tagging bugfix and updated tests to ^0.9
Browse files Browse the repository at this point in the history
  • Loading branch information
Nyholm committed Feb 25, 2016
1 parent 2cd37f0 commit eddb477
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
12 changes: 12 additions & 0 deletions ApcuCachePool.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
*/
class ApcuCachePool extends AbstractCachePool
{
/**
* {@inheritdoc}
*/
protected function fetchObjectFromCache($key)
{
$success = false;
Expand All @@ -27,18 +30,27 @@ protected function fetchObjectFromCache($key)
return [$success, $data, []];
}

/**
* {@inheritdoc}
*/
protected function clearAllObjectsFromCache()
{
return apcu_clear_cache();
}

/**
* {@inheritdoc}
*/
protected function clearOneObjectFromCache($key)
{
apcu_delete($key);

return true;
}

/**
* {@inheritdoc}
*/
protected function storeItemInCache(CacheItemInterface $item, $ttl)
{
if ($ttl < 0) {
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@
"php": "^5.5|^7.0",
"ext-apcu": "*",
"psr/cache": "^1.0",
"cache/adapter-common": "^0.2",
"cache/taggable-cache": "^0.3"
"cache/adapter-common": "^0.3",
"cache/taggable-cache": "^0.4"
},
"require-dev": {
"phpunit/phpunit": "^4.0|^5.1",
"cache/integration-tests": "0.9.0"
"cache/integration-tests": "^0.9"
},
"provide": {
"psr/cache-implementation": "^1.0"
Expand Down

0 comments on commit eddb477

Please sign in to comment.