mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-11-16 10:00:26 +08:00
优化ttlcache
This commit is contained in:
@@ -52,3 +52,9 @@ func (this *Manager) Remove(cache *Cache) {
|
||||
delete(this.cacheMap, cache)
|
||||
this.locker.Unlock()
|
||||
}
|
||||
|
||||
func (this *Manager) Count() int {
|
||||
this.locker.Lock()
|
||||
defer this.locker.Unlock()
|
||||
return len(this.cacheMap)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user