From 01705a5019dbda4cec105868745804f08ac0f353 Mon Sep 17 00:00:00 2001 From: kenshin Date: Wed, 24 Jul 2013 22:47:39 +0800 Subject: [PATCH] remove interface --- cache.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cache.go b/cache.go index 490dc5e..82da34c 100644 --- a/cache.go +++ b/cache.go @@ -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 {