Documentation
¶
Overview ¶
Cache provides a simple marshaling layer on top of the store
Index ¶
- Variables
- func Decrement(key string, val int64) (int64, error)
- func Delete(key string) error
- func Get(key string, val interface{}) (time.Time, error)
- func Increment(key string, val int64) (int64, error)
- func ListKeys() ([]string, error)
- func Set(key string, val interface{}, expires time.Time) error
- type Cache
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefaultCacheSize = 1000 DefaultCache = New(nil) ErrNotFound = errors.New("not found") )
Functions ¶
Types ¶
type Cache ¶
type Cache interface {
// Context returns a tenant scoped Cache
Context(ctx context.Context) Cache
Get(key string, val interface{}) (time.Time, error)
Set(key string, val interface{}, expires time.Time) error
Delete(key string) error
Increment(key string, val int64) (int64, error)
Decrement(key string, val int64) (int64, error)
ListKeys() ([]string, error)
Close() error
}
Click to show internal directories.
Click to hide internal directories.