1
0
mirror of https://github.com/charlienet/go-mixed.git synced 2025-07-18 00:22:41 +08:00
This commit is contained in:
2022-09-01 12:37:57 +08:00
parent 1071ad3694
commit 5b4f8097d6
3 changed files with 13 additions and 0 deletions

6
cache/readme.md vendored
View File

@ -11,3 +11,9 @@
3. 缓存穿透;从数据源中未找到数据时,在缓存中缓存空值。
4. 缓存雪崩;为防止缓存雪崩将资源放入缓存时,对过期时间添加一个随机过期时间,防止缓存同时过期。
5. 自动续期;当访问二级缓存时对使用的资源进行延期。
## 使用方式
```go
Cache.Get(key, dist, func() (bool,error){}, options func(){})
```