-
-
Notifications
You must be signed in to change notification settings - Fork 174
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
feat: cache module metadata & cacheable deserialize #2082
base: v2-dev
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: f797e18 The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR 💥 An error occurred when fetching the changed packages and changesets in this PR
|
9bf6dde
to
e703622
Compare
bd04165
to
7254ab1
Compare
content_map.insert(k, v); | ||
if context.cache_manager.enable { | ||
if let Some(cache) = context | ||
.cache_manager |
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.
This way is the same as plugin_cache_load
, we want the cache key control by the module instead of the plugin, so we may need to add a API like context.cache_manager.add_module_extra_info
the these info will be appended when write the module cache.
When reading cache, we can use handle_persistent_cached_module
hook to restore the cache back to the plugin
Description:
module metadata cache(Replace write_plugin_cache, plugin_cache_loaded)
The cached content will be allocated to some files based on the name, with a maximum of 16 files in total.
https://github.com/farm-fe/farm/pull/2082/files#diff-93e90e2f791f9d64f51ed1c604bd2ad5303e41d37d243f9a05ebd3bbe98b7275R74
Combine module, plugin, and custom store into one
BREAKING CHANGE:
Related issue (if exists):