Documentation
¶
Index ¶
Constants ¶
View Source
const (
TypeNode = "caches"
)
Variables ¶
View Source
var Nil = errors.New("Nil")
Functions ¶
func NewBuilder ¶
func NewBuilder() container.StandardBuilder
Types ¶
type ICache ¶
type ICache interface { Name() string Get(ctx context.Context, key string) (string, error) Set(ctx context.Context, key string, val interface{}, expire int) error Del(ctx context.Context, key string) error HashGet(ctx context.Context, hk, key string) (string, error) HashSet(ctx context.Context, hk, key string, val string) (bool, error) HashDel(ctx context.Context, hk, key string) error HashMGet(ctx context.Context, hk string, key ...string) (map[string]interface{}, error) HashSetAll(ctx context.Context, hk string, val map[string]interface{}) (bool, error) HashExists(ctx context.Context, hk, key string) (bool, error) Increase(ctx context.Context, key string) (int64, error) Decrease(ctx context.Context, key string) (int64, error) Expire(ctx context.Context, key string, expire int) error Exists(ctx context.Context, key string) (bool, error) GetImpl() interface{} }
type StandardCache ¶
StandardCache cache
func NewStandardCache ¶
func NewStandardCache(c container.Container) StandardCache
NewStandardCache 创建cache
Click to show internal directories.
Click to hide internal directories.