LRU + cache conflicts prevention. (#104)

* LRU + cache conflicts prevention.

* Bugfix universalCache flooding ( issue #105 )

  1. Traefik cancels the context for old plugin instances
  2. Each plugin's Close() method is called
  3. The CacheInterfaceWrapper.Close() was calling cache.Close() on the shared singleton caches
  4. Each Close() triggered Clear() which logged "Cleared all items" at INFO level
This commit is contained in:
2025-12-24 18:54:39 +00:00
committed by GitHub
parent 69e0d98c67
commit 413e4a1b7d
12 changed files with 2362 additions and 245 deletions
+1 -1
View File
@@ -436,7 +436,7 @@ func (c *UniversalCache) Clear() {
c.currentSize = 0
c.currentMemory = 0
c.logger.Infof("UniversalCache[%s]: Cleared all items", c.config.Type)
c.logger.Debugf("UniversalCache[%s]: Cleared all items", c.config.Type)
}
// Size returns the number of items in the cache