Documentation ¶
Overview ¶
Package cache provides caching.
Index ¶
- Variables
- type Cache
- type Dummy
- type GCache
- func (ca *GCache) Get(key interface{}) (interface{}, error)
- func (ca *GCache) Has(key interface{}) bool
- func (ca *GCache) New() (Cache, error)
- func (ca *GCache) Purge() error
- func (ca *GCache) Remove(key interface{}) bool
- func (ca *GCache) Set(key interface{}, b interface{}, expire time.Duration) error
- func (ca *GCache) SetWithoutExpire(key interface{}, b interface{}) error
- func (ca *GCache) Traverse(callback func(k, v interface{}) bool) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefaultGCacheSize = 100 * 100 DefaultGCacheType = "lru" )
View Source
var DefaultCacheExpire = time.Hour
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache interface { Get(interface{}) (interface{}, error) Has(interface{}) bool Set(interface{}, interface{}, time.Duration) error Purge() error Remove(interface{}) bool New() (Cache, error) }
func NewCacheFromURI ¶
Click to show internal directories.
Click to hide internal directories.