Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

26
LINES

< > BotCompany Repo | #1014209 // mechList_opt_raw

JavaX fragment (include)

please include function mechList_raw.

static S mechList_opt_raw(S name) ctex {
  lock mechList_raw_lock;
  
  if (mechList_goToCreator() || eq(mechMode().readMode, 'creator))
    ret (S) call(creator(), 'mechList_opt_raw, name);
  
  // get from cache
  S src = mechList_raw_cache.get(name);
  if (src != null) ret src;
  
  // load & put in cache
  src = mechList_opt_raw_fresh(name);
  mechList_raw_cache.put(name, unnull(src));
  ret src;
}

please include function mechList_clearCache.

svoid _onLoad_mechList_opt_raw {
  _registerAutoCloseable(vmBus_onMessage('mechList_clearCache, voidfunc(S listName) {
    if (!isTrue(mechList_clearCache_inFunction!))
      mechList_clearCache_noSend(listName);
  }));
}

Author comment

Began life as a copy of #1014020

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1014209
Snippet name: mechList_opt_raw
Eternal ID of this version: #1014209/10
Text MD5: d1016ee6fed53c2965597de5f510844e
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-10-15 15:01:30
Source code size: 738 bytes / 26 lines
Pitched / IR pitched: No / No
Views / Downloads: 321 / 372
Version history: 9 change(s)
Referenced in: [show references]