Skip to content
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

fix(cache): include namespace in the cache key #4220

Merged
merged 1 commit into from
Jul 12, 2023
Merged

fix(cache): include namespace in the cache key #4220

merged 1 commit into from
Jul 12, 2023

Conversation

mrekucci
Copy link
Contributor

@mrekucci mrekucci commented Jul 12, 2023

Checklist

  • I have read the coding guide.
  • My change requires a documentation update, and I have done it.
  • I have added tests to cover my changes.
  • I have filled out the description and linked the related issues.

Description

Includes a namespace in the cache key, which addresses the case where two entries from different namespaces may have the same ID.

func MustWrap(store storage.Store, capacity int) *Cache {
c, err := Wrap(store, capacity)
if err != nil {
panic(err)
Copy link
Contributor

Choose a reason for hiding this comment

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

is it ok if we panic while we init the state store?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch, fixed!

@mrekucci mrekucci merged commit dc86bad into master Jul 12, 2023
13 checks passed
@mrekucci mrekucci deleted the fix-cache branch July 12, 2023 10:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants