remove interface
This commit is contained in:
		
							
								
								
									
										12
									
								
								cache.go
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								cache.go
									
									
									
									
									
								
							| @ -40,10 +40,10 @@ func (e SerializerError) Error() string { | |||||||
| } | } | ||||||
|  |  | ||||||
| type Cache interface { | type Cache interface { | ||||||
| 	Get(string) (*dns.Msg, error) | 	Get(key string) (*dns.Msg, error) | ||||||
| 	Set(string, *dns.Msg) error | 	Set(key string, mesg *dns.Msg) error | ||||||
| 	Exists(string) bool | 	Exists(key string) bool | ||||||
| 	Remove() | 	Remove(key string) | ||||||
| 	Length() int | 	Length() int | ||||||
| } | } | ||||||
|  |  | ||||||
| @ -72,8 +72,8 @@ func (c *MemoryCache) Set(key string, mesg *dns.Msg) error { | |||||||
| 	return nil | 	return nil | ||||||
| } | } | ||||||
|  |  | ||||||
| func (c *MemoryCache) Remove() { | func (c *MemoryCache) Remove(key string) { | ||||||
|  | 	delete(c.backend, key) | ||||||
| } | } | ||||||
|  |  | ||||||
| func (c *MemoryCache) Exists(key string) bool { | func (c *MemoryCache) Exists(key string) bool { | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user