fix(cache):清除已经不用的调试日志。
This commit is contained in:
parent
a4a9938675
commit
954285e426
7
cache/count.go
vendored
7
cache/count.go
vendored
|
@ -2,7 +2,6 @@ package cache
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"log"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
@ -31,7 +30,6 @@ func CacheCount(relationNames []string, entityName string, count int64, conditio
|
|||
for _, relationName := range relationNames {
|
||||
CacheRelation(relationName, STORE_TYPE_KEY, countKey)
|
||||
}
|
||||
log.Printf("[debug] [cache|save] count key: [%s], err: %+v", countKey, err)
|
||||
return err
|
||||
}
|
||||
|
||||
|
@ -46,11 +44,10 @@ func RetreiveCount(entityName string, condtions ...string) (int64, error) {
|
|||
return -1, nil
|
||||
}
|
||||
instance, err := Retreive[_CountRecord](countKey)
|
||||
log.Printf("[debug] [cache|retreive] count key: [%s], instance: [%v], err: %+v", countKey, instance, err)
|
||||
if instance != nil {
|
||||
if instance != nil && err == nil {
|
||||
return instance.Count, nil
|
||||
} else {
|
||||
return -1, nil
|
||||
return -1, err
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user