static new TreeMap hotwireCached_cache; static Lock hotwireCached_lock = lock(); static Class hotwireCached(S programID) { ret hotwireCached(programID, true); } static Class hotwireCached(S programID, bool runMain) { lock hotwireCached_lock; programID = formatSnippetID(programID); Class c = hotwireCached_cache.get(programID); if (c == null) { c = hotwire(programID); if (runMain) callMain(c); hotwireCached_cache.put(programID, c); } ret c; }