-
Notifications
You must be signed in to change notification settings - Fork 265
Improve consistency of GetCacheDirectory API #446
Description
Triggered by #441
Let me add a caching related question/issue. Feel free to extract into a separate issue if you think it doesn't belong here.
Runtime.cs restricts "does not support the cache directory for class library projects", resulting in a host application not being able to retrieve
CacheDir. While it can replicateCacheDir = GetScriptTempDir().PathJoin("cache"), this obviously is something different thanGetCacheDir(). I am not really getting this piece of code.Or stated differently, could
Runtimeprovide...public static string GetCacheDir() => CacheDir;...on
#if class_lib?Or is
CSExecutor.GetCacheDirectory()something that could be made public?Note the differences among naming of
SetScriptCacheDir()vs.GetCacheDirectory(). Should probably be better aligned.Also, note that with my host app CS-Script creates two differently named directories in "\Temp":
"C:\Users<USER>\AppData\Local\Temp\CSSCRIPT\cache" which contains build info of the scripts.
"C:\Users<USER>\AppData\Local\Temp\csscript.core" which remains empty.Background: My host app outputs verbose information on compiling and loading a script, just like
CS-Script -verbosedoes. But currently there is no method to retrieve the cache dir.
Originally posted by @maettu-this in #441