static ExpiringMap2 mechList_raw_cache = new ExpiringMap2(10000); static Lock mechList_raw_lock = lock(); // timeout for loading static int mechList_raw_timeout = 60000; static S mechList_raw(S name) ctex { lock mechList_raw_lock; // get from cache S src = mechList_raw_cache.get(name); if (src != null) ret src; // load & put in cache - TODO: make postPage honor this temp tempSetThreadLocal(loadPage_forcedTimeout_byThread, mechList_raw_timeout); src = mechList_raw_fresh(name); if (src != null) mechList_raw_cache.put(name, src); ret src; }