diff --git a/cache/count.go b/cache/count.go index b0958bc..b1baa54 100644 --- a/cache/count.go +++ b/cache/count.go @@ -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 } }