Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( //ErrNotFound is the error returned when the key is not found in cache and db ErrNotFound = errors.New("not found") )
Functions ¶
Types ¶
type Option ¶
type Option struct { // BatchSize is the number of keys to be fetched from db in one batch BatchSize int // DefaultCacheExpire is the default expire time of cache DefaultCacheExpire time.Duration // MissCacheExpire is the default expire time of miss cache MissCacheExpire time.Duration // CleanInterval is the default clean interval of cache CleanInterval time.Duration }
Option is the option of cache aside
Click to show internal directories.
Click to hide internal directories.