ericcornelissen/webmangler

Add caching

Opened this issue · 0 comments

Feature Request

Description

Add support for caching data about a mangle session and using that cache later. The goal is to speed up mangling by re-using computed values from an earlier run (the cache) in a new run.

Considerations

  • The programmatic use of the core must support using the cache.
  • The CLI must have the ability to run without the cache. If nothing else this allows usage of the CLI when the cache (either implementation or stored file) is broken.
  • The CLI should have an option to destroy the cache it created.
  • The CLI should have an option to customize the location of the cache it creates.

Implementation Ideas

This is currently just a list of ideas about how the caching could work.

  • If the configuration (specifically Plugins and Language Plugins changed, the cache is invalid
  • Cache the strings found in a file/embed and re-use them if the file/embed didn't change.
    • If a file didn't change, it's embeds didn't change
    • If a file changed, some or all of it's embeds may still be unchanged