ClearScript.Manager icon indicating copy to clipboard operation
ClearScript.Manager copied to clipboard

Support for clearing Script Cache

Open AndersMad opened this issue 10 years ago • 1 comments

Thanks for the contrib - I'm using this as a replacement as the prior use of the vanilla lib for the nice support of caching scripts etc.

I see that the project uses LruCache instead of System.Runtime.Caching, but the later got support for HostFileChangeMonitor/FileChangeMonitor - which could be nice to auto dispose the cached entry on the basis of the script(s) files changes. But since file change monitor is currently not an option - I'd like to suggest a method for clearing the cache manually; Would be much appreciated :) (its currently internal/private)..

E.g. (a thread safe) cal: ClearScript.Manager.ManagerScope().ClearCache()

AndersMad avatar Feb 26 '15 18:02 AndersMad

OK, will take a look when I get a few...feel free to add it and do a pull request! :)

eswann avatar Mar 02 '15 23:03 eswann