实现文档缓存

This commit is contained in:
Minho
2018-02-27 17:20:42 +08:00
parent 405a9c309f
commit 849058ff8a
6 changed files with 323 additions and 38 deletions

39
cache/cache_null.go vendored Normal file
View File

@@ -0,0 +1,39 @@
package cache
import "time"
type NullCache struct {
}
func (bm *NullCache)Get(key string) interface{} {
return nil
}
func (bm *NullCache)GetMulti(keys []string) []interface{} {
return nil
}
func (bm *NullCache)Put(key string, val interface{}, timeout time.Duration) error {
return nil
}
func (bm *NullCache)Delete(key string) error {
return nil
}
func (bm *NullCache)Incr(key string) error {
return nil
}
func (bm *NullCache)Decr(key string) error {
return nil
}
func (bm *NullCache)IsExist(key string) bool {
return false
}
func (bm *NullCache)ClearAll() error{
return nil
}
func (bm *NullCache)StartAndGC(config string) error {
return nil
}