Add LRU cache support.

This commit is contained in:
2025-12-03 10:22:06 +00:00
parent 3d80f457d3
commit da8ec5f21d
10 changed files with 415 additions and 141 deletions
+5
View File
@@ -279,3 +279,8 @@ func (c *LRUMemoryCache) GetMemoryUsage() int64 {
func (c *LRUMemoryCache) GetMaxMemorySize() int64 {
return c.maxMemorySize
}
// CountQueries returns the number of entries in the cache
func (c *LRUMemoryCache) CountQueries() int64 {
return atomic.LoadInt64(&c.currentCount)
}