remove interface

This commit is contained in:
kenshin 2013-07-24 22:47:39 +08:00
parent f30e0ba257
commit 01705a5019
1 changed files with 6 additions and 6 deletions

View File

@ -40,10 +40,10 @@ func (e SerializerError) Error() string {
}
type Cache interface {
Get(string) (*dns.Msg, error)
Set(string, *dns.Msg) error
Exists(string) bool
Remove()
Get(key string) (*dns.Msg, error)
Set(key string, mesg *dns.Msg) error
Exists(key string) bool
Remove(key string)
Length() int
}
@ -72,8 +72,8 @@ func (c *MemoryCache) Set(key string, mesg *dns.Msg) error {
return nil
}
func (c *MemoryCache) Remove() {
func (c *MemoryCache) Remove(key string) {
delete(c.backend, key)
}
func (c *MemoryCache) Exists(key string) bool {