-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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: expose ".del" function on lmdb cache #32459
Conversation
… instance to be removed in v4
…ith properly exposed del method
Probably also need to update this dummy one: gatsby/packages/gatsby/src/utils/api-runner-node.js Lines 229 to 244 in 9595ccb
|
Added in 229a523 |
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.
Thank you!
* expose '.del' method on cache instances, mark exposing internal cache instance to be removed in v4 * make gatsby-plugin-sharp work with legacy cache del way and new way with properly exposed del method * add .del method to ts typings * add .del method to dummy cache (for onPreInit lifecycle) (cherry picked from commit e1a1396)
* expose '.del' method on cache instances, mark exposing internal cache instance to be removed in v4 * make gatsby-plugin-sharp work with legacy cache del way and new way with properly exposed del method * add .del method to ts typings * add .del method to dummy cache (for onPreInit lifecycle) (cherry picked from commit e1a1396) Co-authored-by: Michal Piechowiak <misiek.piechowiak@gmail.com>
Fixed in |
Description
Introduction of lmdb implementation of cache (passed to plugins) is missing
.cache
internal cache being exposed (as "legacy" cache does). This causegatsby-plugin-sharp
that want to use.del
on that internal cache instance to crash ingatsby develop
.This PR does few things:
a) adds compat mode to lmdb cache implementation (add
.cache
property that is just reference to itself)b) adds
.del
method on public interface (and implement it in both legacy cache and lmdb cache)c) future proofs
gatsby-plugin-sharp
to use public.del
if available (ideally we remove access to internal cache implementation in v4)Related Issues
Fixes #32445