diff --git a/cmd/server/store.go b/cmd/server/store.go index d8ce1bc..2482944 100644 --- a/cmd/server/store.go +++ b/cmd/server/store.go @@ -1083,18 +1083,6 @@ func (s *PacketStore) IngestNewFromDB(sinceID, limit int) ([]map[string]interfac result = append(result, broadcastMap) } - // Invalidate analytics caches since new data was ingested - if len(result) > 0 { - s.cacheMu.Lock() - s.rfCache = make(map[string]*cachedResult) - s.topoCache = make(map[string]*cachedResult) - s.hashCache = make(map[string]*cachedResult) - s.chanCache = make(map[string]*cachedResult) - s.distCache = make(map[string]*cachedResult) - s.subpathCache = make(map[string]*cachedResult) - s.cacheMu.Unlock() - } - return result, newMaxID } @@ -1266,20 +1254,6 @@ func (s *PacketStore) IngestNewObservations(sinceObsID, limit int) int { } } - if len(updatedTxs) > 0 { - // Invalidate analytics caches - s.cacheMu.Lock() - s.rfCache = make(map[string]*cachedResult) - s.topoCache = make(map[string]*cachedResult) - s.hashCache = make(map[string]*cachedResult) - s.chanCache = make(map[string]*cachedResult) - s.distCache = make(map[string]*cachedResult) - s.subpathCache = make(map[string]*cachedResult) - s.cacheMu.Unlock() - - // analytics caches cleared; no per-cycle log to avoid stdout overhead - } - return newMaxObsID }