rscarson/rustyscript

how to auto cache url import to disk

i18nsite opened this issue · 3 comments

as title

I've added a ModuleCacheProvider trait you will be able to implement in the next version to provide caching

To give more details on how this will work; RuntimeOptions now has a module_cache property
Which will be a boxed instance of a type implementing the module_loader::ModuleCacheProvider trait

You will find DefaultModuleCacheProvider in module_loader.rs as an example of how to implement it
You should be able to use that to perform disk caching how you wish

Fixed in version 0.4.0