feat(*): 创作与运维 - 新增图片尺寸预设和系统性能面板并优化图片组动画

This commit is contained in:
ddCat
2026-09-07 14:03:50 +08:00
parent df94c3bdf1
commit bd639745ac
41 changed files with 2785 additions and 353 deletions

View File

@@ -139,9 +139,15 @@ func (c *boundedReadCache[K, V]) remove(e *readCacheEntry[K, V]) {
}
func (c *boundedReadCache[K, V]) clear() {
c.clearAndCount()
}
func (c *boundedReadCache[K, V]) clearAndCount() int {
c.mu.Lock()
defer c.mu.Unlock()
count := len(c.entries)
c.entries = make(map[K]*readCacheEntry[K, V])
c.lru.Init()
c.bytes = 0
return count
}