Documentation ¶
Index ¶
Constants ¶
View Source
const EmptyCacheExpiration = 5 * time.Second
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseCache ¶ added in v0.0.2
type BaseCache struct {
// contains filtered or unexported fields
}
type Cache ¶ added in v0.0.2
type Cache interface { Get(key Key) (interface{}, error) GetString(key Key) (string, error) GetBool(key Key) (bool, error) GetTime(key Key) (time.Time, error) Disabled() bool }
func NewBaseCache ¶ added in v0.0.2
func NewBaseCache(disabled bool, retrieveFunc RetrieveFunc, backend backend.Backend) Cache
func NewRedisCache ¶
type EmptyCache ¶ added in v0.0.2
type EmptyCache struct {
// contains filtered or unexported fields
}
TODO: 内存上可以优化, error相同的话使用同一个对象
type Int64Key ¶ added in v0.0.2
type Int64Key struct {
// contains filtered or unexported fields
}
func NewInt64Key ¶ added in v0.0.2
type RetrieveFunc ¶ added in v0.0.2
Click to show internal directories.
Click to hide internal directories.