feat: msg local cache

This commit is contained in:
withchao
2024-01-08 16:47:39 +08:00
parent 1ae523dcc2
commit 3d77c1c8cf
6 changed files with 63 additions and 26 deletions
+1 -1
View File
@@ -42,7 +42,7 @@ func (r *cacheTarget) String() string {
func TestName(t *testing.T) {
target := &cacheTarget{}
l := NewCache[string](100, 1000, time.Second*20, time.Second*5, target)
l := NewCache[string](100, 1000, time.Second*20, time.Second*5, target, nil)
//l := NewLRU[string, string](1000, time.Second*20, time.Second*5, target)
fn := func(key string, n int, fetch func() (string, error)) {