Versions in this module Expand all Collapse all v1 v1.3.0 Jun 19, 2014 v1.2.0 May 16, 2014 Changes in this version + var DefaultEvery int = 60 + var FileCacheDirectoryLevel int = 2 + var FileCacheEmbedExpiry int64 = 0 + var FileCacheFileSuffix string = ".bin" + var FileCachePath string = "cache" + func File_get_contents(filename string) ([]byte, error) + func File_put_contents(filename string, content []byte) error + func GetBool(v interface{}) bool + func GetFloat64(v interface{}) float64 + func GetInt(v interface{}) int + func GetInt64(v interface{}) int64 + func GetString(v interface{}) string + func Gob_decode(data []byte, to *FileCacheItem) error + func Gob_encode(data interface{}) ([]byte, error) + func Register(name string, adapter Cache) + type Cache interface + ClearAll func() error + Decr func(key string) error + Delete func(key string) error + Get func(key string) interface{} + Incr func(key string) error + IsExist func(key string) bool + Put func(key string, val interface{}, timeout int64) error + StartAndGC func(config string) error + func NewCache(adapterName, config string) (Cache, error) + type FileCache struct + CachePath string + DirectoryLevel int + EmbedExpiry int + FileSuffix string + func NewFileCache() *FileCache + func (this *FileCache) ClearAll() error + func (this *FileCache) Decr(key string) error + func (this *FileCache) Delete(key string) error + func (this *FileCache) Get(key string) interface{} + func (this *FileCache) Incr(key string) error + func (this *FileCache) Init() + func (this *FileCache) IsExist(key string) bool + func (this *FileCache) Put(key string, val interface{}, timeout int64) error + func (this *FileCache) StartAndGC(config string) error + type FileCacheItem struct + Data interface{} + Expired int64 + Lastaccess int64 + type MemoryCache struct + Every int + func NewMemoryCache() *MemoryCache + func (bc *MemoryCache) ClearAll() error + func (bc *MemoryCache) Decr(key string) error + func (bc *MemoryCache) Delete(name string) error + func (bc *MemoryCache) Get(name string) interface{} + func (bc *MemoryCache) Incr(key string) error + func (bc *MemoryCache) IsExist(name string) bool + func (bc *MemoryCache) Put(name string, value interface{}, expired int64) error + func (bc *MemoryCache) StartAndGC(config string) error + type MemoryItem struct + Lastaccess time.Time