Initial commit
This commit is contained in:
14
pkg/cache/cache.go
vendored
Normal file
14
pkg/cache/cache.go
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
package cache
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
)
|
||||
|
||||
// Cache defines the interface for caching operations
|
||||
type Cache interface {
|
||||
Set(ctx context.Context, key string, value interface{}, expiration time.Duration) error
|
||||
Get(ctx context.Context, key string) (string, error)
|
||||
Del(ctx context.Context, key string) error
|
||||
Close() error
|
||||
}
|
||||
Reference in New Issue
Block a user