feat(*): 创作与运维 - 新增图片尺寸预设和系统性能面板并优化图片组动画
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user