Compare commits
2 Commits
Author | SHA1 | Date |
---|---|---|
chenzhihui | f9825cb900 | 2 years ago |
chenzhihui | 315d3048bf | 2 years ago |
@ -0,0 +1,13 @@ |
||||
package cache |
||||
|
||||
import ( |
||||
"context" |
||||
"time" |
||||
) |
||||
|
||||
// Cache is a generic key value cache interface.
|
||||
type Cache interface { |
||||
Get(ctx context.Context, key string) (interface{}, error) |
||||
Put(ctx context.Context, key string, value interface{}, ttl time.Duration) error |
||||
Delete(ctx context.Context, key string) error |
||||
} |
Loading…
Reference in new issue