mirror of
https://github.com/charlienet/go-mixed.git
synced 2025-07-18 00:22:41 +08:00
update
This commit is contained in:
6
cache/readme.md
vendored
6
cache/readme.md
vendored
@ -11,3 +11,9 @@
|
||||
3. 缓存穿透;从数据源中未找到数据时,在缓存中缓存空值。
|
||||
4. 缓存雪崩;为防止缓存雪崩将资源放入缓存时,对过期时间添加一个随机过期时间,防止缓存同时过期。
|
||||
5. 自动续期;当访问二级缓存时对使用的资源进行延期。
|
||||
|
||||
## 使用方式
|
||||
|
||||
```go
|
||||
Cache.Get(key, dist, func() (bool,error){}, options func(){})
|
||||
```
|
||||
|
Reference in New Issue
Block a user