feat: Add function to check if cache contains a key#382
feat: Add function to check if cache contains a key#382Darkheir wants to merge 3 commits intoallegro:mainfrom
Conversation
eb3ed48 to
0086967
Compare
|
Do we need this func? We have |
|
The main difference is that I also find it more readable to do |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #382 +/- ##
==========================================
+ Coverage 89.08% 89.31% +0.23%
==========================================
Files 15 15
Lines 797 805 +8
==========================================
+ Hits 710 719 +9
Misses 73 73
+ Partials 14 13 -1
Continue to review full report in Codecov by Sentry.
|
janisz
left a comment
There was a problem hiding this comment.
Since @cristaloleg is fine with extending the interface let's merge it. Just one nitpic
| return false | ||
| } | ||
| entryKey := readKeyFromEntry(wrappedEntry) | ||
| s.lock.RUnlock() |
There was a problem hiding this comment.
@cristaloleg do you think we should increment hit count here?
There was a problem hiding this comment.
Deeply philosophical question. I'm fine to not increment it here. Leave it only for real value get.
Add a new function allowing to check if the cache contains the given key