-
-
Notifications
You must be signed in to change notification settings - Fork 12
fix(cache): isolate cache keys per provider name and options #281
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
base: main
Are you sure you want to change the base?
fix(cache): isolate cache keys per provider name and options #281
Conversation
85c0863 to
fa869d3
Compare
cb6bacd to
d30e722
Compare
0966299 to
f10ed13
Compare
src/cache.ts
Outdated
| // No hash for string parts for better readability. | ||
| const part = typeof f === 'string' ? f : hash(f) |
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.
For example, if we also hash values like the font provider’s name, it becomes difficult to identify files when checking what Storage has saved. So I think we shouldn’t hash string fields.
e1d8f29 to
9f764a1
Compare
|
@danielroe |
|
Since the commit history became too cluttered and conflicted with other PRs, I used a force push. |
fixes #184
This PR updates the cache storage generation to automatically include the provider name and options in the cache key.
Users don’t need to do anything special when defining a provider.
Additional Context
Purpose 1 of #239 (comment).