[WIP] Refactor cache section in tempodb/backend#399
Closed
dgzlopes wants to merge 3 commits intografana:masterfrom
Closed
[WIP] Refactor cache section in tempodb/backend#399dgzlopes wants to merge 3 commits intografana:masterfrom
dgzlopes wants to merge 3 commits intografana:masterfrom
Conversation
Signed-off-by: Daniel González Lopes <danielgonzalezlopes@gmail.com>
Contributor
|
Great work @dgzlopes! 🎉 I'll take a look tomorrow, but this is definitely in the right direction! |
Signed-off-by: Daniel González Lopes <danielgonzalezlopes@gmail.com>
Signed-off-by: Daniel González Lopes <danielgonzalezlopes@gmail.com>
annanay25
reviewed
Jan 7, 2021
| Shutdown() | ||
| } | ||
|
|
||
| func NewCache(nextReader backend.Reader, nextWriter backend.Writer, cache Cache) (backend.Reader, backend.Writer, error) { |
Contributor
There was a problem hiding this comment.
thought(non-blocking): I think we may run into cyclic dependencies here. In the case that happens, we can change the signature of this function to accept a cfg object instead of Cache.
func NewCache(nextReader backend.Reader, nextWriter backend.Writer, cfg tempodb.Config) (backend.Reader, backend.Writer, error)
| @@ -0,0 +1,60 @@ | |||
| package memcached | |||
Contributor
There was a problem hiding this comment.
We can add a memcached_test.go with just a single line:
var _ (cache.Cache) = (*Cache)(nil)
similarly for redis.
| TTL time.Duration `yaml:"ttl"` | ||
| } | ||
|
|
||
| type Cache struct { |
Contributor
There was a problem hiding this comment.
Let's name this Client. That way when we create the client the signature will be memcache.NewClient()., which also helps reduce confusion. Similarly for Redis.
3 tasks
Member
Author
|
Closing in favor of #485 |
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.
What this PR does:
TBD
Which issue(s) this PR fixes:
Fixes #373
Fixes #424
Checklist
CHANGELOG.mdupdated - the order of entries should be[CHANGE],[FEATURE],[ENHANCEMENT],[BUGFIX]cc @annanay25