func (s *LRUCache[K, V]) Merge(caches ...*LRUCache[K, V]) {
	for _, cache := range caches {
		for _, key := range cache.GetKeys() {
			value, ok := cache.GetValue(key)
			if !ok {
				continue
			}

			s.Put(key, value)
		}
	}
}
// Merge merge multiple lru caches
Merge merge multiple lru caches
// Merge merge multiple lru caches
func (s *LRUCache[K, V]) Merge(caches ...*LRUCache[K, V]) {
	for _, cache := range caches {
		for _, key := range cache.GetKeys() {
			value, ok := cache.GetValue(key)
			if !ok {
				continue
			}
			s.Put(key, value)
		}
	}
}
func ( s * LRUCache [ K , V ] ) Merge ( caches ... * LRUCache [ K , V ] ) { for _ , cache := range caches { for _ , key := range cache . GetKeys ( ) { value , ok := cache . GetValue ( key ) if ! ok { continue } s . Put ( key , value ) } } }
Merge merge multiple lru caches
Merge merge multiple lru caches