Versions in this module Expand all Collapse all v2 v2.1.8 Mar 10, 2024 Changes in this version + func DeleteContext(ctx context.Context, cache Cache, key string) error + func GetContext(ctx context.Context, cache Cache, key string) interface + func IsExistContext(ctx context.Context, cache Cache, key string) bool + func SetContext(ctx context.Context, cache Cache, key string, val interface{}, ...) error + type Cache interface + Delete func(key string) error + Get func(key string) interface{} + IsExist func(key string) bool + Set func(key string, val interface{}, timeout time.Duration) error + type ContextCache interface + DeleteContext func(ctx context.Context, key string) error + GetContext func(ctx context.Context, key string) interface{} + IsExistContext func(ctx context.Context, key string) bool + SetContext func(ctx context.Context, key string, val interface{}, timeout time.Duration) error + type Memcache struct + func NewMemcache(server ...string) *Memcache + func (mem *Memcache) Delete(key string) error + func (mem *Memcache) Get(key string) interface{} + func (mem *Memcache) IsExist(key string) bool + func (mem *Memcache) Set(key string, val interface{}, timeout time.Duration) (err error) + type Memory struct + func NewMemory() *Memory + func (mem *Memory) Delete(key string) error + func (mem *Memory) Get(key string) interface{} + func (mem *Memory) IsExist(key string) bool + func (mem *Memory) Set(key string, val interface{}, timeout time.Duration) (err error) + type Redis struct + func NewRedis(ctx context.Context, opts *RedisOpts) *Redis + func (r *Redis) Delete(key string) error + func (r *Redis) DeleteContext(ctx context.Context, key string) error + func (r *Redis) Get(key string) interface{} + func (r *Redis) GetContext(ctx context.Context, key string) interface{} + func (r *Redis) IsExist(key string) bool + func (r *Redis) IsExistContext(ctx context.Context, key string) bool + func (r *Redis) Set(key string, val interface{}, timeout time.Duration) error + func (r *Redis) SetConn(conn redis.UniversalClient) + func (r *Redis) SetContext(ctx context.Context, key string, val interface{}, timeout time.Duration) error + func (r *Redis) SetRedisCtx(ctx context.Context) + type RedisOpts struct + Database int + Host string + IdleTimeout int + MaxActive int + MaxIdle int + Password string Other modules containing this package github.com/bbang94/wechat