Allow for cache adapter injection#38
Merged
clue merged 7 commits intoreactphp:masterfrom Jul 29, 2016
Merged
Conversation
Member
Author
Member
|
I think this makes sense 👍 |
Member
Author
Cheers! Does the way I've implemented it also makes sense? |
Member
Absolutely! I'm not a huge fan of the given design, but despite a lack of documentation/tests this LGTM 👍 |
Member
Author
Cheers, I'll add the tests and documentation soon |
Member
Author
|
Documentation and test added, also updated the other cache test to ensure default behavior isn't affected |
README.md
Outdated
|
|
||
| ### Custom cache adapter | ||
|
|
||
| You can also specify a cache that [implements](https://github.com/reactphp/react/wiki/Users#cache-implementations) [`CacheInterface`](https://github.com/reactphp/cache) to handle the record cache instead of the default in memory cache. |
Member
There was a problem hiding this comment.
Perhaps we can make this a bit more explicit:
By default, the above will use an in memory cache.
You can also specify a custom cache implementing [`CacheInterface`](https://github.com/reactphp/cache) to handle the record cache instead:
[…]
See also the wiki for possible [cache implementations](https://github.com/reactphp/react/wiki/Users#cache-implementations).
Member
|
LGTM 👍 |
Member
Author
|
Great! |
Member
Author
|
Could anyone else 👎 or 👍 this so it can be merged and tagged? Could use that :) |
Member
|
Let's get this in! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
While developing wyrihaximus/react-cache-redis I've noticed that passing your own cache implementation into the resolver is suboptimal compared to the proposed change.
To do: