From 4f50ef56d506c73b3f4118aaaaa812fe56613f04 Mon Sep 17 00:00:00 2001 From: PengYechang <815314586@qq.com> Date: Tue, 20 Feb 2024 19:09:15 +0800 Subject: [PATCH] feat(cache): improve md (#1063) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: 彭业昌 --- website/docs/jupiter/4.9freecache.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/website/docs/jupiter/4.9freecache.md b/website/docs/jupiter/4.9freecache.md index 94442087b8..55bbe9a171 100644 --- a/website/docs/jupiter/4.9freecache.md +++ b/website/docs/jupiter/4.9freecache.md @@ -53,6 +53,7 @@ pkg/cache 包支持多个本地缓存库,并支持metric上报 ### 2 初始化实例 ```go import ( + "github.com/douyu/jupiter/pkg/cache" "github.com/douyu/jupiter/pkg/cache/xfreecache/v2" ) @@ -62,7 +63,7 @@ type Student struct { } type Instance struct { - localCache *xfreecache.LocalCache[string, Student] + localCache *cache.Cache[string, Student] } func NewInstance() *Instance { @@ -134,11 +135,12 @@ package bwlist import ( "context" + "github.com/douyu/jupiter/pkg/cache" "github.com/douyu/jupiter/pkg/cache/xfreecache/v2" ) type Instance struct { - localCache *xfreecache.LocalCache[int32, []int32] + localCache *cache.Cache[int32, []int32] } func NewInstance() *Instance {