1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-23 21:00:54 +00:00

Merge pull request #4313 from AllenX2018/fix-issue-4312

fix issue #4312
This commit is contained in:
Ming Deng 2020-11-14 16:04:29 +08:00 committed by GitHub
commit 05d8e293f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -28,14 +28,14 @@ func NewSsdbCache() cache.Cache {
func (rc *Cache) Get(ctx context.Context, key string) (interface{}, error) { func (rc *Cache) Get(ctx context.Context, key string) (interface{}, error) {
if rc.conn == nil { if rc.conn == nil {
if err := rc.connectInit(); err != nil { if err := rc.connectInit(); err != nil {
return nil, nil return nil, err
} }
} }
value, err := rc.conn.Get(key) value, err := rc.conn.Get(key)
if err == nil { if err == nil {
return value, nil return value, nil
} }
return nil, nil return nil, err
} }
// GetMulti gets one or keys values from ssdb. // GetMulti gets one or keys values from ssdb.