Skip to content

AdapterCache Interface 为什么设计的接口这么少呢? #824

Open
@zxiubo

Description

@zxiubo
type AdapterCache interface {
	String() string
	Get(key string) (string, error)
	Set(key string, val interface{}, expire int) error
	Del(key string) error
	HashGet(hk, key string) (string, error)
	HashDel(hk, key string) error
	Increase(key string) error
	Decrease(key string) error
	Expire(key string, dur time.Duration) error
}

实现了 HashGet(hk, key string) (string, error) 方法,但是 hset 这类方法都没有实现?
请问这么设计的原因是什么呢?redis原生的client也拿不到...

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions