static ExpiringMap2<S, S> mechList_raw_cache = new ExpiringMap2(10000).setMap(ciMap());
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;
  
  if (empty(name)) ret "";
  
  // 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;
}

svoid _onLoad_mechList_raw {
  ownResource(vmBus_onMessage mechChange(
    listName -> mechList_raw_cache.remove((S) listName));
}