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.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for Redis caching #354
Add support for Redis caching #354
Changes from all commits
089396c
59d921a
69b1f59
3cdc181
3858ed2
ab372e1
9732281
a144a9c
3e7e651
a3b88c1
4e682db
8be7e14
81ea1e9
212ce13
467de3a
6086822
98b7362
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There seems to be a ton of code that's pretty much the same as memcached/cache.go .. This can get tough to maintain. I would suggest we split out the cache section into a separate module and pass it a Cache interface which looks something like this
The different cache backends can then implement this small interface instead of the entire
backend.Reader
/backend.Writer
interfaces. It will also help to keep all the tests in one place.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
diskcache
should live inside this separate module too? Probably not, I suppose 😕There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
diskcache
should also live there, but if that turns out to be tough we can always address it in a different PR :)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A simple map cache can be implemented like in memcached tests but I saw Cortex is using this too, so OK.