Documentation
¶
Index ¶
- type Cache
- type ErrorCache
- type RedisCache
- func (p RedisCache) Add(key string, value interface{}) error
- func (p RedisCache) AddExpire(key string, value interface{}, d time.Duration) error
- func (p RedisCache) Delete(key string)
- func (p RedisCache) Deletes(keys []string)
- func (p RedisCache) Get(key string) (interface{}, error)
- func (p RedisCache) Set(key string, value interface{}) error
- func (p RedisCache) SetExpire(key string, value interface{}, d time.Duration) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache interface { Add(key string, value interface{}) error AddExpire(key string, value interface{}, d time.Duration) error Set(key string, value interface{}) error SetExpire(key string, value interface{}, d time.Duration) error Get(key string) (interface{}, error) Delete(key string) Deletes(keys []string) }
type ErrorCache ¶
type ErrorCache struct { }
type RedisCache ¶
type RedisCache struct {
// contains filtered or unexported fields
}
func GetRedisCache ¶
func GetRedisCache() *RedisCache
func NewRedisCache ¶
func NewRedisCache() *RedisCache
func (RedisCache) Add ¶
func (p RedisCache) Add(key string, value interface{}) error
func (RedisCache) AddExpire ¶
func (p RedisCache) AddExpire(key string, value interface{}, d time.Duration) error
func (RedisCache) Delete ¶
func (p RedisCache) Delete(key string)
func (RedisCache) Deletes ¶
func (p RedisCache) Deletes(keys []string)
func (RedisCache) Get ¶
func (p RedisCache) Get(key string) (interface{}, error)
func (RedisCache) Set ¶
func (p RedisCache) Set(key string, value interface{}) error
Click to show internal directories.
Click to hide internal directories.