2018-02-27 17:20:42 +08:00
|
|
|
package cache
|
|
|
|
|
2021-03-23 21:55:50 +08:00
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
"time"
|
|
|
|
)
|
2018-02-27 17:20:42 +08:00
|
|
|
|
|
|
|
type NullCache struct {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2021-03-23 21:55:50 +08:00
|
|
|
func (bm *NullCache) Get(ctx context.Context, key string) (interface{}, error) {
|
|
|
|
return nil, nil
|
2018-02-27 17:20:42 +08:00
|
|
|
}
|
|
|
|
|
2021-03-23 21:55:50 +08:00
|
|
|
func (bm *NullCache)GetMulti(ctx context.Context, keys []string) ([]interface{}, error) {
|
|
|
|
return nil, nil
|
2018-02-27 17:20:42 +08:00
|
|
|
}
|
|
|
|
|
2021-03-23 21:55:50 +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
|
|
|
|
}
|
2021-03-23 21:55:50 +08:00
|
|
|
func (bm *NullCache)Delete(ctx context.Context,key string) error {
|
2018-02-27 17:20:42 +08:00
|
|
|
return nil
|
|
|
|
}
|
2021-03-23 21:55:50 +08:00
|
|
|
func (bm *NullCache)Incr(ctx context.Context,key string) error {
|
2018-02-27 17:20:42 +08:00
|
|
|
return nil
|
|
|
|
}
|
2021-03-23 21:55:50 +08:00
|
|
|
func (bm *NullCache)Decr(ctx context.Context,key string) error {
|
2018-02-27 17:20:42 +08:00
|
|
|
return nil
|
|
|
|
}
|
2021-03-23 21:55:50 +08:00
|
|
|
func (bm *NullCache)IsExist(ctx context.Context,key string) (bool, error) {
|
|
|
|
return false, nil
|
2018-02-27 17:20:42 +08:00
|
|
|
}
|
2021-03-23 21:55:50 +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
|
|
|
|
}
|