static Cache> cachedNodeIndex2_cache = new Cache(f cachedNodeIndex2_make); static bool cachedNodeIndex_autoMake = true; sbool cachedNodeIndex2_monitorCircleEditor; static bool cachedNodeIndex2_first = true; static FileStatus cachedNodeIndex2_status; please include function postSoftwareMadeWeb. static MultiMap cachedNodeIndex2() { if (cachedNodeIndex2_first) { cachedNodeIndex2_first = false; onWebsChanged(f cachedNodeIndex2_clear); onTransientWebAdded_do(f cachedNodeIndex2_onNewWeb); onTransientWebRemoved_do(f cachedNodeIndex2_onWebRemoved); setAdd(postSoftwareMadeWeb_onNewWeb, f cachedNodeIndex2_onNewWeb); } if (cachedNodeIndex2_monitorCircleEditor) { FileStatus status = conceptsFileStatus(circlesEditorDBID()); if (neq(cachedNodeIndex2_status, status)) { cachedNodeIndex2_status = status; cachedNodeIndex2_cache.clear(); } } ret cachedNodeIndex2_cache!; } static void cachedNodeIndex2_clear() { cachedNodeIndex2_cache.clear(); } sbool cachedNodeIndex2_onNewWeb(Web web, O[] params) { ret cachedNodeIndex2_onNewWeb(web); } sbool cachedNodeIndex2_onNewWeb(Web web) { if (!cachedNodeIndex_autoMake) false; lock cachedNodeIndex2_cache.lock; //print("Incremental update"); ai_addWebToIndex(cachedNodeIndex2_cache!, web); cachedNodeIndex2_cache.changeCount++; false; // don't trigger full update } svoid cachedNodeIndex2_onWebRemoved(Web web) { if (!cachedNodeIndex_autoMake) ret; lock cachedNodeIndex2_cache.lock; print("Incremental removal"); ai_removeWebFromIndex(cachedNodeIndex2_cache!, web); cachedNodeIndex2_cache.changeCount++; } static long cachedNodeIndex_changeCount() { ret cachedNodeIndex2_cache.changeCount; } static MultiMap cachedNodeIndex2_make() { if (cachedNodeIndex_autoMake) { print("Making index"); ret dwlw_fullNodeIndex_ci(); } else { //print("Skipping making index"); ret ai_emptyWebIndex(); } }