Compare commits

...

2 Commits
main ... cache

Author SHA1 Message Date
chenzhihui f9825cb900 fix ttl 2 years ago
chenzhihui 315d3048bf add cache interface 2 years ago
  1. 13
      cache/cache.go

13
cache/cache.go vendored

@ -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…
Cancel
Save