Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

blackhole cache storage adapter #4512

Merged
merged 2 commits into from
May 23, 2013
Merged

blackhole cache storage adapter #4512

merged 2 commits into from
May 23, 2013

Conversation

marc-mabe
Copy link
Member

This PR implements a black hole storage adapter (like in #4196) but doesn't extends AbstractAdapter so there is no overhead and it implements all interfaces to make it possible as a replacement in all cases.

Because it doesn't extend AbstractAdapter it has no plugin system implemented and configuring plugins together with this adapter will result in an exception.

@prolic
Copy link
Contributor

prolic commented May 21, 2013

Just curious: How to use the blackhole adapter, when I need plugins in a real world application. How can I replace this with a blackhole adapter?

@marc-mabe
Copy link
Member Author

@prolic What do you mean with "I need plugins"? Plugins exists to add functionalities (like the Serializer) or to influence behavior of a storage (like the ExceptionHandler). The plugin system isn't part of the storage interface as plugins doesn't change basics of a key-value storage.

Applications should depend of a public (and well defined) API which will be the case here. If there is a very special case your application requires a behavior you should use the Capabilities of the storage to know if that storage will be ok. If the BlackHole storage will not you have to write your own. If you have a behavior not listed within the Capabilities you should create an issue.

... you need do remove the plugins - key of your configuration to instantiate the black hole storage using the factory.

@prolic
Copy link
Contributor

prolic commented May 21, 2013

Thanks for your explanations.

* Set options.
*
* @param array|Traversable|Adapter\AdapterOptions $options
* @return StorageInterface Fluent interface
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change to @return self

@ghost ghost assigned weierophinney May 23, 2013
weierophinney added a commit that referenced this pull request May 23, 2013
weierophinney added a commit that referenced this pull request May 23, 2013
- trailing whitespace
weierophinney added a commit that referenced this pull request May 23, 2013
@weierophinney weierophinney merged commit 289af44 into zendframework:develop May 23, 2013
weierophinney added a commit to zendframework/zend-cache that referenced this pull request May 15, 2015
…ature/blackhole-cache-storage

blackhole cache storage adapter
weierophinney added a commit to zendframework/zend-cache that referenced this pull request May 15, 2015
weierophinney added a commit to zendframework/zend-cache that referenced this pull request May 15, 2015
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants