cache_null.go 661 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. package cache
  2. import "time"
  3. type NullCache struct {
  4. }
  5. func (bm *NullCache) Get(key string) interface{} {
  6. return nil
  7. }
  8. func (bm *NullCache)GetMulti(keys []string) []interface{} {
  9. return nil
  10. }
  11. func (bm *NullCache)Put(key string, val interface{}, timeout time.Duration) error {
  12. return nil
  13. }
  14. func (bm *NullCache)Delete(key string) error {
  15. return nil
  16. }
  17. func (bm *NullCache)Incr(key string) error {
  18. return nil
  19. }
  20. func (bm *NullCache)Decr(key string) error {
  21. return nil
  22. }
  23. func (bm *NullCache)IsExist(key string) bool {
  24. return false
  25. }
  26. func (bm *NullCache)ClearAll() error{
  27. return nil
  28. }
  29. func (bm *NullCache)StartAndGC(config string) error {
  30. return nil
  31. }