-
Notifications
You must be signed in to change notification settings - Fork 14.4k
Adds cache invalidation logic #20372
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: master
Are you sure you want to change the base?
Adds cache invalidation logic #20372
Conversation
aa81cce
to
d2f8dc9
Compare
CI failures are more Nokogiri issues, I believe they are safe to ignore. |
updated_cache = {} | ||
|
||
# Calculate per-file MD5s in parallel, only recalculating if mtime/size changed | ||
file_md5s = Parallel.map(files, in_threads: Etc.nprocessors * 2) do |file| |
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.
It might be worthwhile using fibers, but they're bit of a mystery in terms of stability and whether they'll be supported long-term or not - your call on investigating the performance differences between the two 🙌 (cc @sjanusz-r7)
df711e5
to
041f1f8
Compare
041f1f8
to
b9ad658
Compare
This pull request fixes #20352
This pull request adds a caching validation. The goal is to force cache metadata to be reloaded if any changes have been made to
lib
,modules
and~/.msf4/modules
. If changes have been made theDeferModuleLoads
loads option will be overwritten to force a reload of the metadata cache.Performance
CRC (2.91)
md5 (3.0)
Verification
To test this easier add some logging to the new methods for when the cache is being invalidated
lib
,modules
and~/.msf4/modules
are reflected when restarting console~/.msf4/modules
is able to be used after a reboot of consolelib
,modules
and~/.msf4/modules
cause the cache to be invalidated~/.msf4/store/cache_metadata_base.json