mirror of
				https://github.com/EchoVault/SugarDB.git
				synced 2025-11-01 03:42:54 +08:00 
			
		
		
		
	Renamed eviction2 import alias to eviction
This commit is contained in:
		| @@ -22,7 +22,7 @@ import ( | |||||||
| 	"fmt" | 	"fmt" | ||||||
| 	"github.com/echovault/echovault/internal" | 	"github.com/echovault/echovault/internal" | ||||||
| 	"github.com/echovault/echovault/internal/aof" | 	"github.com/echovault/echovault/internal/aof" | ||||||
| 	eviction2 "github.com/echovault/echovault/internal/eviction" | 	"github.com/echovault/echovault/internal/eviction" | ||||||
| 	"github.com/echovault/echovault/internal/memberlist" | 	"github.com/echovault/echovault/internal/memberlist" | ||||||
| 	"github.com/echovault/echovault/internal/raft" | 	"github.com/echovault/echovault/internal/raft" | ||||||
| 	"github.com/echovault/echovault/internal/snapshot" | 	"github.com/echovault/echovault/internal/snapshot" | ||||||
| @@ -56,13 +56,13 @@ type EchoVault struct { | |||||||
| 	} | 	} | ||||||
| 	// LFU cache used when eviction policy is allkeys-lfu or volatile-lfu | 	// LFU cache used when eviction policy is allkeys-lfu or volatile-lfu | ||||||
| 	lfuCache struct { | 	lfuCache struct { | ||||||
| 		mutex sync.Mutex         // Mutex as only one goroutine can edit the LFU cache at a time. | 		mutex sync.Mutex        // Mutex as only one goroutine can edit the LFU cache at a time. | ||||||
| 		cache eviction2.CacheLFU // LFU cache represented by a min head. | 		cache eviction.CacheLFU // LFU cache represented by a min head. | ||||||
| 	} | 	} | ||||||
| 	// LRU cache used when eviction policy is allkeys-lru or volatile-lru | 	// LRU cache used when eviction policy is allkeys-lru or volatile-lru | ||||||
| 	lruCache struct { | 	lruCache struct { | ||||||
| 		mutex sync.Mutex         // Mutex as only one goroutine can edit the LRU at a time. | 		mutex sync.Mutex        // Mutex as only one goroutine can edit the LRU at a time. | ||||||
| 		cache eviction2.CacheLRU // LRU cache represented by a max head. | 		cache eviction.CacheLRU // LRU cache represented by a max head. | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	// Holds the list of all commands supported by the echovault. | 	// Holds the list of all commands supported by the echovault. | ||||||
| @@ -466,17 +466,17 @@ func (server *EchoVault) initialiseCaches() { | |||||||
| 	// Set up LFU cache | 	// Set up LFU cache | ||||||
| 	server.lfuCache = struct { | 	server.lfuCache = struct { | ||||||
| 		mutex sync.Mutex | 		mutex sync.Mutex | ||||||
| 		cache eviction2.CacheLFU | 		cache eviction.CacheLFU | ||||||
| 	}{ | 	}{ | ||||||
| 		mutex: sync.Mutex{}, | 		mutex: sync.Mutex{}, | ||||||
| 		cache: eviction2.NewCacheLFU(), | 		cache: eviction.NewCacheLFU(), | ||||||
| 	} | 	} | ||||||
| 	// set up LRU cache | 	// set up LRU cache | ||||||
| 	server.lruCache = struct { | 	server.lruCache = struct { | ||||||
| 		mutex sync.Mutex | 		mutex sync.Mutex | ||||||
| 		cache eviction2.CacheLRU | 		cache eviction.CacheLRU | ||||||
| 	}{ | 	}{ | ||||||
| 		mutex: sync.Mutex{}, | 		mutex: sync.Mutex{}, | ||||||
| 		cache: eviction2.NewCacheLRU(), | 		cache: eviction.NewCacheLRU(), | ||||||
| 	} | 	} | ||||||
| } | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Kelvin Mwinuka
					Kelvin Mwinuka