static HashMap loadFunc_cache = new HashMap; static O loadFunc_cached(S code) { synchronized(loadFunc_cache) { O c = loadFunc_cache.get(code); if (c == null) loadFunc_cache.put(code, c = loadFunc(code)); ret c; } }