Documentation ¶
Index ¶
- func Delete(key string) (suc bool)
- func GC()
- func Get(key string) (has bool, data []byte)
- func Set(key string, val []byte, life int64) (suc bool)
- func SetDefaultCacheHandler(cache Cache)
- type Cache
- type Data
- type FileCache
- func (cache *FileCache) Delete(key string) bool
- func (cache *FileCache) DeleteAll() bool
- func (cache *FileCache) GC()
- func (cache *FileCache) Get(key string) (has bool, data []byte)
- func (cache *FileCache) Set(key string, data []byte, life int64) (suc bool)
- func (cache *FileCache) StartGcTimer(sec int64)
- type NoneCache
- func (cache *NoneCache) Delete(key string) (suc bool)
- func (cache *NoneCache) DeleteAll() (suc bool)
- func (cache *NoneCache) GC()
- func (cache *NoneCache) Get(key string) (has bool, data []byte)
- func (cache *NoneCache) Set(key string, val []byte, life int64) bool
- func (cache *NoneCache) StartGcTimer(sec int64)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetDefaultCacheHandler ¶
func SetDefaultCacheHandler(cache Cache)
Types ¶
type FileCache ¶
type FileCache struct { Cache // contains filtered or unexported fields }
func NewFileCache ¶
func (*FileCache) StartGcTimer ¶
type NoneCache ¶
type NoneCache struct {
Cache
}
func NewNoneCache ¶
func NewNoneCache() *NoneCache
func (*NoneCache) StartGcTimer ¶
Click to show internal directories.
Click to hide internal directories.