优化结构
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
package system
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
)
|
||||
|
||||
// Cache is the shared cache seam. The data implementation uses Redis when it
|
||||
// is reachable and falls back to process memory for local development.
|
||||
type Cache interface {
|
||||
Get(context.Context, string) (string, bool, error)
|
||||
Set(context.Context, string, string, time.Duration) error
|
||||
Delete(context.Context, string) error
|
||||
Increment(context.Context, string, time.Duration) (int64, error)
|
||||
}
|
||||
Reference in New Issue
Block a user