Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotFound = errors.New("not found") ErrExpired = errors.New("expired") )
Functions ¶
func Register ¶
func Register(name string, driver CacheDriver)
Types ¶
type Cache ¶
type Cache interface {
SetRegion(region string) error
Get(key string) (v interface{}, err error)
Has(key string) (ok bool, err error)
Add(key string, value interface{}, lifetime time.Duration) error
Set(key string, value interface{}, lifetime time.Duration) error
Delete(key string) error
Keys() (keys []string, err error)
Flush() error
}
Click to show internal directories.
Click to hide internal directories.