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

16
LINES

< > BotCompany Repo | #1007414 // aiConceptsMap_cached (key = global id)

JavaX fragment (include)

static Cache<Map<S, AIConcept>> aiConceptsMap_cached_cache = new Cache(f aiConceptsMap);
static double aiConceptsMap_cached_autoClearInterval = 30;

static Map<S, AIConcept> aiConceptsMap_cached() {
  aiConceptsMap_cached_cache.clear(aiConceptsMap_cached_autoClearInterval);
  ret aiConceptsMap_cached_cache!;
}

static void aiConceptsMap_clearCache() {
  aiConceptsMap_cached_cache.clear();
}

// clear cache if older than x seconds
static void aiConceptsMap_clearCache(double seconds) {
  aiConceptsMap_cached_cache.clear(seconds);
}

Author comment

Began life as a copy of #1007162

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: #1007414
Snippet name: aiConceptsMap_cached (key = global id)
Eternal ID of this version: #1007414/9
Text MD5: 049c6d73ae77006972c86c9c835d969e
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-03-28 02:24:27
Source code size: 550 bytes / 16 lines
Pitched / IR pitched: No / No
Views / Downloads: 614 / 625
Version history: 8 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)