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

11
LINES

< > BotCompany Repo | #1017784 // parse3_cachedPattern

JavaX fragment (include)

scope parse3_cachedPattern.

static Map<S, LS> #cache = synchronizedMRUCache(1000);

static synchronized L<S> parse3_cachedPattern(S s) {
  LS tok = cache.get(s);
  if (tok == null) cache.put(s, tok = parse3(s));
  ret tok;
}

end scope

Author comment

Began life as a copy of #1005207

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: #1017784
Snippet name: parse3_cachedPattern
Eternal ID of this version: #1017784/4
Text MD5: 6f234eea50eec3d88b0d51988f805d72
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-09-07 15:36:27
Source code size: 246 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 361 / 423
Version history: 3 change(s)
Referenced in: [show references]