package cache
import "fmt"
type CacheInterface interface {
Get(key interface{})
Put(key interface{}, value interface{})
Delete(key interface{})
}
type ServerCacheInterface interface {
ReBuild(config string)
}
type Cache struct {
}
func (c *Cache) Get(key interface{}) {
fmt.Println("Cache", key)
}
func (c *Cache) Put(key interface{}, value interface{}) {
fmt.Println("Cache", key, value)
}
func (c *Cache) Delete(key interface{}) {
fmt.Println("Cache", key)
}
type ServerCache struct {
}
func (c *ServerCache) Get(key interface{}) {
fmt.Println("ServerCache", key)
}
func (c *ServerCache) Put(key interface{}, value interface{}) {
fmt.Println("ServerCache", key, value)
}
func (c *ServerCache) Delete(key interface{}) {
fmt.Println("ServerCache", key)
}
func (c *ServerCache) ReBuild(config string) {
fmt.Println("ServerCache reBuild", config)
}
评论