MCPcopy Create free account
hub / github.com/astercloud/aster / updateCache

Method updateCache

pkg/knowledge/manager.go:849–859  ·  view source on GitHub ↗

updateCache 更新缓存

(item *KnowledgeItem)

Source from the content-addressed store, hash-verified

847
848// updateCache 更新缓存
849func (m *manager) updateCache(item *KnowledgeItem) {
850 if !m.config.CacheEnabled {
851 return
852 }
853
854 expire := time.Now().Add(m.config.CacheTTL)
855 m.cache[item.ID] = &cacheEntry{
856 item: item,
857 expire: expire,
858 }
859}
860
861// audit 记录审计日志
862func (m *manager) audit(action, userID, itemID, details string) {

Callers 3

AddMethod · 0.95
GetMethod · 0.95
UpdateMethod · 0.95

Calls 1

AddMethod · 0.65

Tested by

no test coverage detected