Documentation ¶
Index ¶
- type Cache
- type MapCache
- func (c *MapCache) Clear() error
- func (c *MapCache) Close() error
- func (c *MapCache) Evict(key string) error
- func (c *MapCache) Get(key string) ([]byte, error)
- func (c *MapCache) Put(key string, value []byte, ttl time.Duration) error
- func (c *MapCache) PutIfAbsent(key string, value []byte, ttl time.Duration) error
- type MapCacheConfig
- type RedisCache
- func (c *RedisCache) Clear() error
- func (c *RedisCache) Close() error
- func (c *RedisCache) Evict(key string) error
- func (c *RedisCache) Get(key string) ([]byte, error)
- func (c *RedisCache) Put(key string, value []byte, ttl time.Duration) error
- func (c *RedisCache) PutIfAbsent(key string, value []byte, ttl time.Duration) error
- type RedisCacheConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MapCache ¶
type MapCache struct {
// contains filtered or unexported fields
}
func NewMapCache ¶
func NewMapCacheWithConfig ¶
func NewMapCacheWithConfig(config MapCacheConfig) (*MapCache, error)
type MapCacheConfig ¶
type RedisCache ¶
type RedisCache struct {
// contains filtered or unexported fields
}
func NewRedisCache ¶
func NewRedisCache() (*RedisCache, error)
func NewRedisCacheWithConfig ¶
func NewRedisCacheWithConfig(config RedisCacheConfig) (*RedisCache, error)
func (*RedisCache) Clear ¶
func (c *RedisCache) Clear() error
func (*RedisCache) Close ¶
func (c *RedisCache) Close() error
func (*RedisCache) Evict ¶
func (c *RedisCache) Evict(key string) error
func (*RedisCache) PutIfAbsent ¶
type RedisCacheConfig ¶
Click to show internal directories.
Click to hide internal directories.