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

11
LINES

< > BotCompany Repo | #1007959 // javaTok_cached

JavaX fragment (include)

1  
scope javaTok_cached.
2  
3  
static Map<S, LS> #cache = synchronizedMRUCache(100);
4  
5  
static L<S> javaTok_cached(S s) {
6  
  LS tok = cache.get(s);
7  
  if (tok == null) cache.put(s, tok = javaTok(s));
8  
  ret tok;
9  
}
10  
11  
end scope

Author comment

Began life as a copy of #1005207

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1007959
Snippet name: javaTok_cached
Eternal ID of this version: #1007959/4
Text MD5: 8c0d2ea61609de9e60b56524e88818f6
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-03-04 00:54:56
Source code size: 221 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 548 / 570
Version history: 3 change(s)
Referenced in: [show references]