A golang memcache with LRU to swap
go get github.com/g4zhuj/cache
// If maxItemSize is zero, the cache has no limit.
var cache Cache
maxSize = 1024
cache = NewMemCache(maxSize)
value, ok := cache.Get("key")
cache.Set("key", "value")
cache.Delete("delKey")
status := cache.Status()
fmt.Println("Gets Count: ", status.Gets)
fmt.Println("Hits Count: ", status.Hits)
fmt.Println("MaxItemSize: ", status.MaxItemSize)
fmt.Println("CurrentSize: ", status.CurrentSize)