diff --git a/internal/querymanager/query_manager.go b/internal/querymanager/query_manager.go index c78834e2c..700b1ac84 100644 --- a/internal/querymanager/query_manager.go +++ b/internal/querymanager/query_manager.go @@ -23,7 +23,7 @@ import ( ) type ( - cacheStore common.ITable[string, *object.Obj] + CacheStore common.ITable[string, *object.Obj] // QuerySubscription represents a subscription to watch a query. QuerySubscription struct { @@ -54,7 +54,7 @@ type ( // Manager watches for changes in keys and notifies clients. Manager struct { WatchList sync.Map // WatchList is a map of query string to their respective clients, type: map[string]*sync.Map[int]struct{} - QueryCache common.ITable[string, cacheStore] // QueryCache is a map of fingerprints to their respective data caches + QueryCache common.ITable[string, CacheStore] // QueryCache is a map of fingerprints to their respective data caches QueryCacheMu sync.RWMutex logger *slog.Logger } @@ -86,23 +86,23 @@ func NewClientIdentifier(clientIdentifierID int, isHTTPClient bool) ClientIdenti } } -func NewQueryCacheStoreRegMap() common.ITable[string, cacheStore] { - return &common.RegMap[string, cacheStore]{ - M: make(map[string]cacheStore), +func NewQueryCacheStoreRegMap() common.ITable[string, CacheStore] { + return &common.RegMap[string, CacheStore]{ + M: make(map[string]CacheStore), } } -func NewQueryCacheStore() common.ITable[string, cacheStore] { +func NewQueryCacheStore() common.ITable[string, CacheStore] { return NewQueryCacheStoreRegMap() } -func NewCacheStoreRegMap() cacheStore { +func NewCacheStoreRegMap() CacheStore { return &common.RegMap[string, *object.Obj]{ M: make(map[string]*object.Obj), } } -func NewCacheStore() cacheStore { +func NewCacheStore() CacheStore { return NewCacheStoreRegMap() } @@ -221,7 +221,7 @@ func (m *Manager) updateQueryCache(queryFingerprint string, event dstore.QueryWa store, ok := m.QueryCache.Get(queryFingerprint) if !ok { - m.logger.Warn("Fingerprint not found in cacheStore", slog.String("fingerprint", queryFingerprint)) + m.logger.Warn("Fingerprint not found in CacheStore", slog.String("fingerprint", queryFingerprint)) return }