mindoc/cache/cache_null.go

43 lines
880 B
Go
Raw Normal View History

2018-02-27 17:20:42 +08:00
package cache
import (
"context"
"time"
)
2018-02-27 17:20:42 +08:00
type NullCache struct {
}
func (bm *NullCache) Get(ctx context.Context, key string) (interface{}, error) {
return nil, nil
2018-02-27 17:20:42 +08:00
}
func (bm *NullCache)GetMulti(ctx context.Context, keys []string) ([]interface{}, error) {
return nil, nil
2018-02-27 17:20:42 +08:00
}
func (bm *NullCache)Put(ctx context.Context,key string, val interface{}, timeout time.Duration) error {
2018-02-27 17:20:42 +08:00
return nil
}
func (bm *NullCache)Delete(ctx context.Context,key string) error {
2018-02-27 17:20:42 +08:00
return nil
}
func (bm *NullCache)Incr(ctx context.Context,key string) error {
2018-02-27 17:20:42 +08:00
return nil
}
func (bm *NullCache)Decr(ctx context.Context,key string) error {
2018-02-27 17:20:42 +08:00
return nil
}
func (bm *NullCache)IsExist(ctx context.Context,key string) (bool, error) {
return false, nil
2018-02-27 17:20:42 +08:00
}
func (bm *NullCache)ClearAll(ctx context.Context) error{
2018-02-27 17:20:42 +08:00
return nil
}
func (bm *NullCache)StartAndGC(config string) error {
return nil
}