Documentation
¶
Overview ¶
Cache provides a simple marshaling layer on top of the store
Index ¶
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{}) 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)
}
Click to show internal directories.
Click to hide internal directories.