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
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)
}