public static O2MappedAstData get(string file) { if (CacheEnabled && Cached_O2MappedAstData.hasKey(file)) { // "[Ast_Engine_Cache] using O2MappedAstData cached version of file: {0}".debug(file); return(Cached_O2MappedAstData[file]); } // "[Ast_Engine_Cache] creating O2MappedAstData for file: {0}".debug(file); var astData = new O2MappedAstData(); astData.loadFile(file); if (CacheEnabled) { Cached_O2MappedAstData.add(file, astData); } return(astData); }
public static Dictionary <string, O2MappedAstData> clear() { "[Ast_Engine_Cache] clearing cache".info(); Cached_O2MappedAstData.Clear(); return(Cached_O2MappedAstData); }