Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache interface { Get(key string) (value any, err error) Set(key string, value any, expire time.Duration) error Delete(key string) error Clean() }
func GetMemoryCache ¶
func GetMemoryCache() Cache
func NewMemoryCache ¶
func NewMemoryCache() Cache
type MemoryCache ¶
type MemoryCache struct {
// contains filtered or unexported fields
}
func (*MemoryCache) Delete ¶
func (m *MemoryCache) Delete(key string) error
Delete implements Cache.
func (*MemoryCache) Gc ¶
func (m *MemoryCache) Gc()
type RedisClient ¶
type RedisClient struct {
// contains filtered or unexported fields
}
func NewRedisClient ¶
func NewRedisClient(cfg *Config) *RedisClient
func (*RedisClient) Client ¶ added in v1.10.0
func (rdb *RedisClient) Client() *redis.Client
func (*RedisClient) Delete ¶
func (rdb *RedisClient) Delete(key string) error
Delete implements Cache.
Click to show internal directories.
Click to hide internal directories.