Documentation ¶ Index ¶ type Memory func NewMemory(defaultExpiration, cleanupInterval time.Duration) *Memory func (m *Memory) Delete(key string) func (m *Memory) Get(key string) (interface{}, bool) func (m *Memory) Set(key string, val interface{}, d time.Duration) type Redis func NewRedis(option *redis.Options) (*Redis, error) func (r *Redis) Clear() error func (r *Redis) Delete(key string) error func (r *Redis) Get(key string) (interface{}, bool, error) func (r *Redis) Set(key string, val interface{}, d time.Duration) error Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Memory ¶ type Memory struct { // contains filtered or unexported fields } func NewMemory ¶ func NewMemory(defaultExpiration, cleanupInterval time.Duration) *Memory func (*Memory) Delete ¶ func (m *Memory) Delete(key string) func (*Memory) Get ¶ func (m *Memory) Get(key string) (interface{}, bool) func (*Memory) Set ¶ func (m *Memory) Set(key string, val interface{}, d time.Duration) type Redis ¶ type Redis struct { // contains filtered or unexported fields } func NewRedis ¶ func NewRedis(option *redis.Options) (*Redis, error) func (*Redis) Clear ¶ func (r *Redis) Clear() error func (*Redis) Delete ¶ func (r *Redis) Delete(key string) error func (*Redis) Get ¶ func (r *Redis) Get(key string) (interface{}, bool, error) func (*Redis) Set ¶ func (r *Redis) Set(key string, val interface{}, d time.Duration) error Source Files ¶ View all Source files memory.go redis.go Click to show internal directories. Click to hide internal directories.