Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:recycle: Clarify attribute view cache invalidation and remove an obsolete key deletion https://github.com/siyuan-note/siyuan/issues/20266

Daniel6b647f1e507f
diff --git a/kernel/cache/av.go b/kernel/cache/av.go
index 27d341ed6a..cfe7e89a5e 100644
--- a/kernel/cache/av.go
+++ b/kernel/cache/av.go
@@ -43,6 +43,8 @@ var avCacheKeys = map[string]map[string]struct{}{}
var avCacheKeysLock sync.Mutex
var avDataVersion uint64
+
+// 失效后的版本令牌保留到全量清理,以拒绝尚未完成的原始数据准入和搜索结果写入。
var avDataVersions = map[string]uint64{}
var avSearchDataCache = map[string]*avSearchDataEntry{}
var avSearchDataCacheLock sync.RWMutex
@@ -141,7 +143,6 @@ func RemoveAVData(avID string) {
delete(avCacheKeys, avID)
avCacheKeysLock.Unlock()
- avCache.Del(avID)
avCache.Del(avCacheKey(avID, ""))
for key := range keys {
avCache.Del(key)