Documentation ¶
Index ¶
Constants ¶
View Source
const (
DefaultCleanupInterval = 5 * time.Minute
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MemoryBackend ¶
type MemoryBackend struct {
// contains filtered or unexported fields
}
func NewMemoryBackend ¶
func NewMemoryBackend(name string, expiration time.Duration) *MemoryBackend
func (*MemoryBackend) Delete ¶ added in v0.0.3
func (c *MemoryBackend) Delete(key string) error
func (*MemoryBackend) Get ¶
func (c *MemoryBackend) Get(key string) (interface{}, bool)
type RedisBackend ¶
type RedisBackend struct {
// contains filtered or unexported fields
}
func NewRedisBackend ¶
func NewRedisBackend(name string, cli *redis.Client, expiration time.Duration) *RedisBackend
func (*RedisBackend) Delete ¶ added in v0.0.3
func (c *RedisBackend) Delete(key string) error
func (*RedisBackend) Get ¶
func (c *RedisBackend) Get(key string) (interface{}, bool)
Click to show internal directories.
Click to hide internal directories.