Documentation ¶
Index ¶
- type RedisPlugin
- func (r *RedisPlugin) BatchDeleteKeys(ctx context.Context, keys []string) (int64, error)
- func (r *RedisPlugin) BatchGetValue(ctx context.Context, keys []string, p reflect.Type) (interface{}, error)
- func (r *RedisPlugin) BatchKeyExist(ctx context.Context, keys []string) (bool, error)
- func (r *RedisPlugin) BatchSetValue(ctx context.Context, pairs []util.Pair) error
- func (r *RedisPlugin) CleanCache(ctx context.Context) (int64, error)
- func (r *RedisPlugin) DeleteKey(ctx context.Context, key string) (int64, error)
- func (r *RedisPlugin) DeleteKeysWithPrefix(ctx context.Context, keyPrefix string) (int64, error)
- func (r *RedisPlugin) GetValue(ctx context.Context, key string, ptr interface{}) error
- func (r *RedisPlugin) Init(conf *config.CacheConfig, prefix string) error
- func (r *RedisPlugin) InitScripts() error
- func (r *RedisPlugin) KeyExist(ctx context.Context, key string) (int64, error)
- func (r *RedisPlugin) SetBitValue(ctx context.Context, offsets []int64) error
- func (r *RedisPlugin) SetValue(ctx context.Context, key string, value interface{}) error
- func (r *RedisPlugin) Test(ctx context.Context, offsets []int64) (bool, error)
- type TangCacheInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RedisPlugin ¶
type RedisPlugin struct {
// contains filtered or unexported fields
}
func (*RedisPlugin) BatchDeleteKeys ¶
BatchDeleteKeys 批量删除Key对应的缓存
func (*RedisPlugin) BatchGetValue ¶
func (r *RedisPlugin) BatchGetValue(ctx context.Context, keys []string, p reflect.Type) (interface{}, error)
BatchGetValue 批量获取缓存值
func (*RedisPlugin) BatchKeyExist ¶
BatchKeyExist 批量判断Key是否存在于缓存中
func (*RedisPlugin) BatchSetValue ¶
BatchSetValue 批量插入
func (*RedisPlugin) CleanCache ¶
func (r *RedisPlugin) CleanCache(ctx context.Context) (int64, error)
CleanCache 清空缓存
func (*RedisPlugin) DeleteKeysWithPrefix ¶
DeleteKeysWithPrefix 通过前缀删除对应的缓存
func (*RedisPlugin) GetValue ¶
func (r *RedisPlugin) GetValue(ctx context.Context, key string, ptr interface{}) error
GetValue 通过Key获取Value
func (*RedisPlugin) Init ¶
func (r *RedisPlugin) Init(conf *config.CacheConfig, prefix string) error
func (*RedisPlugin) InitScripts ¶
func (r *RedisPlugin) InitScripts() error
InitScripts 预加载部分可能用的到的脚本到Redis
func (*RedisPlugin) SetBitValue ¶
func (r *RedisPlugin) SetBitValue(ctx context.Context, offsets []int64) error
SetBitValue 布隆过滤器-设置Bit
type TangCacheInterface ¶
type TangCacheInterface interface { Init(conf *config.CacheConfig, prefix string) error InitScripts() error CleanCache(ctx context.Context) (int64, error) BatchKeyExist(ctx context.Context, keys []string) (bool, error) KeyExist(ctx context.Context, key string) (int64, error) GetValue(ctx context.Context, key string, ptr interface{}) error SetValue(ctx context.Context, key string, value interface{}) error BatchGetValue(ctx context.Context, keys []string, p reflect.Type) (interface{}, error) BatchSetValue(ctx context.Context, pairs []util.Pair) error DeleteKey(ctx context.Context, key string) (int64, error) BatchDeleteKeys(ctx context.Context, keys []string) (int64, error) DeleteKeysWithPrefix(ctx context.Context, keyPrefix string) (int64, error) SetBitValue(ctx context.Context, offsets []int64) error Test(ctx context.Context, offsets []int64) (bool, error) }
Click to show internal directories.
Click to hide internal directories.