Skip to content

Commit

Permalink
Merge pull request #4 from PrisisForks/update-taggable-cache-and-tests
Browse files Browse the repository at this point in the history
Update taggable cache and tests
  • Loading branch information
cryptiklemur committed Jan 25, 2016
2 parents 5451339 + 1ad43d0 commit 45cabcd
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 14 deletions.
33 changes: 24 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,26 @@
# Void PSR-6 adapter
[![Build Status](https://travis-ci.org/php-cache/void-adapter.svg?branch=master)](https://travis-ci.org/php-cache/void-adapter) [![codecov.io](https://codecov.io/github/php-cache/void-adapter/coverage.svg?branch=master)](https://codecov.io/github/php-cache/void-adapter?branch=master)
# Void PSR-6 Cache pool
[![Latest Stable Version](https://poser.pugx.org/cache/void-adapter/v/stable)](https://packagist.org/packages/cache/void-adapter) [![codecov.io](https://codecov.io/github/php-cache/void-adapter/coverage.svg?branch=master)](https://codecov.io/github/php-cache/void-adapter?branch=master) [![Build Status](https://travis-ci.org/php-cache/void-adapter.svg?branch=master)](https://travis-ci.org/php-cache/void-adapter) [![Total Downloads](https://poser.pugx.org/cache/void-adapter/downloads)](https://packagist.org/packages/cache/void-adapter) [![Monthly Downloads](https://poser.pugx.org/cache/void-adapter/d/monthly.png)](https://packagist.org/packages/cache/void-adapter) [![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg)](LICENSE)

This is a void implementation of PSR-6. Other names for this adapter could be Blackhole or Null. This
adapter does not save anything and will always return an empty CacheItem.
This is a void implementation of a PSR-6 cache. Other names for this adapter could be Blackhole or Null. This adapter does not save anything and will always return an empty CacheItem. It is a part of the PHP Cache organisation. To read about features like tagging and hierarchy support please read the shared documentation at [www.php-cache.com](www.php-cache.com.

| Feature | Supported |
| ------- | --------- |
| Flush everything | No
| Expiration time | No
| Tagging | Yes
### Install

```bash
composer require cache/void-adapter
```

### Configure

You do not need to do any configuration to use the `VoidCachePool`.

### Usage

```php
use Cache\Adapter\Void\VoidCachePool;

$pool = new VoidCachePool();
```

### Contribute

Contributions are very welcome! Send us a pull request or report any issues you find on the [issue tracker](http://issues.php-cache.com).
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@
"require":
{
"php": "^5.5|^7.0",
"psr/cache": "1.0.0",
"cache/adapter-common": "^0.1",
"cache/taggable-cache": "^0.2"
"psr/cache": "~1.0",
"cache/adapter-common": "^0.2",
"cache/taggable-cache": "^0.3"
},
"require-dev":
{
"phpunit/phpunit": "^5.1|^4.0",
"cache/integration-tests": "dev-master"
"cache/integration-tests": "^0.7"
},
"provide":
{
Expand Down
2 changes: 1 addition & 1 deletion src/VoidCachePool.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class VoidCachePool extends AbstractCachePool
{
protected function fetchObjectFromCache($key)
{
return false;
return [false, null];
}

protected function clearAllObjectsFromCache()
Expand Down
5 changes: 5 additions & 0 deletions tests/IntegrationPoolTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ class IntegrationPoolTest extends BaseTest
'testHasItem' => 'Void adapter does not save,',
'testDeleteItems' => 'Void adapter does not save,',
'testSave' => 'Void adapter does not save,',
'testSaveWithoutExpire' => 'Void adapter does not save,',
'testDataTypeFloat' => 'Void adapter only outputs boolean,',
'testDataTypeBoolean' => 'Void adapter only outputs boolean,',
'testDataTypeArray' => 'Void adapter only outputs boolean,',
'testDataTypeObject' => 'Void adapter only outputs boolean,',
'testDeferredSave' => 'Void adapter does not save,',
'testDeferredSaveWithoutCommit' => 'Void adapter does not save,',
'testCommit' => 'Void adapter does not save,',
Expand Down

0 comments on commit 45cabcd

Please sign in to comment.