golib/gcache
2023-10-11 07:36:56 +08:00
..
config.go refactor: 使用 memory cache 2023-10-11 07:36:56 +08:00
hash.go refactor: 使用 memory cache 2023-10-11 07:36:56 +08:00
icache.go refactor: 使用 memory cache 2023-10-11 07:36:56 +08:00
memory_test.go refactor: 使用 memory cache 2023-10-11 07:36:56 +08:00
memory.go refactor: 使用 memory cache 2023-10-11 07:36:56 +08:00
option.go refactor: 使用 memory cache 2023-10-11 07:36:56 +08:00
readme.adoc refactor: 使用 memory cache 2023-10-11 07:36:56 +08:00
redis.go refactor: 使用 memory cache 2023-10-11 07:36:56 +08:00

说明

1. 快速使用

c := cache.NewMemCache()
c.Set("a", 1)
c.Set("b", 1, cache.WithEx(1*time.Second))
time.sleep(1*time.Second)
c.Get("a") // 1, true
c.Get("b") // nil, false