make mem cache an interface and inject

This commit is contained in:
6543 2021-12-03 04:32:30 +01:00
parent 0bc38b668f
commit f35c4d0f66
No known key found for this signature in database
GPG key ID: C99B82E40B027BAE
3 changed files with 23 additions and 18 deletions

View file

@ -5,4 +5,5 @@ import "time"
type SetGetKey interface {
Set(key string, value interface{}, ttl time.Duration) error
Get(key string) (interface{}, bool)
Remove(key string)
}