mirror of
https://github.com/zeromicro/go-zero.git
synced 2026-05-10 16:30:01 +08:00
refactor: simplify getValueInterface function (#5280)
This commit is contained in:
@@ -81,6 +81,10 @@ func (c *Cache) Del(key string) {
|
||||
delete(c.data, key)
|
||||
c.lruCache.remove(key)
|
||||
c.lock.Unlock()
|
||||
|
||||
// RemoveTimer is called outside the lock to avoid performance impact from this
|
||||
// potentially time-consuming operation. Data integrity is maintained by lruCache,
|
||||
// which will eventually evict any remaining entries when capacity is exceeded.
|
||||
c.timingWheel.RemoveTimer(key)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user