Dmitriy Gnatenko 1b9d3a6ed8 Add LRU memory cache 7 mesi fa
..
cache.go 1b9d3a6ed8 Add LRU memory cache 7 mesi fa
cache_config.go 9c20f6f267 Add TTL cache 7 mesi fa
readme.md 1b9d3a6ed8 Add LRU memory cache 7 mesi fa

readme.md

Usage example

cache := NewCache(
    NewConfig(
        memoryCache.WithCleanupInterval(30*time.Minute),
        memoryCache.WithExpiration(time.Hour),
    ),
)

cache.Set("1", "value 1", nil)

exp := 12*time.Hour
cache.Set("2", "value 2", &exp)
	
val1, found1 := cache.Get("1") // "value 1", true
val3, found3 := cache.Get("3") // nil, false