Refine Comments : admin/profile.go,bean/mock.go,config/global.go... (#5009)

* Refine Comments

* refine comments for cache.go

* refine comments for log.go

* Update orm.go

* refine comments for orm_log.go,types.go

* Update utils.go

* Update doc.go
This commit is contained in:
Regan Yue
2022-07-08 21:19:52 +08:00
committed by GitHub
parent 2c506f7c2b
commit 49be2581d1
10 changed files with 56 additions and 55 deletions

View File

@@ -47,23 +47,23 @@ import (
// c.Incr("counter") // now is 2
// count := c.Get("counter").(int)
type Cache interface {
// get cached value by key.
// Get will get cached value by key.
Get(key string) interface{}
// GetMulti is a batch version of Get.
GetMulti(keys []string) []interface{}
// set cached value with key and expire time.
// Put will set cached value with key and expire time.
Put(key string, val interface{}, timeout time.Duration) error
// delete cached value by key.
// Delete will delete cached value by key.
Delete(key string) error
// increase cached int value by key, as a counter.
// Incr will increase cached int value by key, as a counter.
Incr(key string) error
// decrease cached int value by key, as a counter.
// Decr will decrease cached int value by key, as a counter.
Decr(key string) error
// check if cached value exists or not.
// IsExist can check if cached value exists or not.
IsExist(key string) bool
// clear all cache.
// ClearAll will clear all cache.
ClearAll() error
// start gc routine based on config string settings.
// StartAndGC will start gc routine based on config string settings.
StartAndGC(config string) error
}