Documentation ¶
Index ¶
Constants ¶
View Source
const (
DefaultDelChan = "teco_xorm_del_cache"
)
Variables ¶
View Source
var (
ErrNotExist = errors.New("record does not exist")
)
Functions ¶
This section is empty.
Types ¶
type MemoryStore ¶
type MemoryStore struct {
// contains filtered or unexported fields
}
MemoryStore represents in-memory store
func NewMemoryStore ¶
func NewMemoryStore(r *redis.Client, printDebugLog bool, delChan ...string) *MemoryStore
NewMemoryStore creates a new store in memory
func (*MemoryStore) Get ¶
func (s *MemoryStore) Get(key string) (interface{}, error)
Get gets object from store
func (*MemoryStore) Put ¶
func (s *MemoryStore) Put(key string, value interface{}) error
Put puts object into store
type RedisCache ¶
type RedisCache struct {
// contains filtered or unexported fields
}
RedisCache 是一个实现 Xorm Cacher 接口的结构体
func NewRedisCache ¶
func NewRedisCache(client *redis.Client, ttl time.Duration, printDebugLog bool) *RedisCache
NewRedisCache 创建一个新的 RedisCache 实例
Click to show internal directories.
Click to hide internal directories.