feat: S3 server cache (#1329)

* optimize scheduled deletion

* optimize scheduled deletion

* optimize scheduled deletion

* optimize scheduled deletion

* minio cache

* fix: conflicts

* feat: minio cache

* feat: cache optimize

* feat: cache optimize

* feat: cache optimize

* feat: cache optimize

* feat: cache optimize
This commit is contained in:
chao
2023-11-02 20:40:45 -05:00
committed by GitHub
parent 62e9980f3c
commit cb0bf64435
8 changed files with 386 additions and 159 deletions
+4
View File
@@ -18,6 +18,7 @@ import (
"context"
"encoding/json"
"errors"
"github.com/OpenIMSDK/tools/mw/specialerror"
"time"
"github.com/dtm-labs/rockscache"
@@ -209,6 +210,9 @@ func batchGetCache2[T any, K comparable](
return fns(ctx, key)
})
if err != nil {
if errs.ErrRecordNotFound.Is(specialerror.ErrCode(errs.Unwrap(err))) {
continue
}
return nil, err
}
res = append(res, val)