Skip to content

Commit

Permalink
feat: add new cache interface define
Browse files Browse the repository at this point in the history
  • Loading branch information
inhere committed Apr 25, 2022
1 parent 41a2d95 commit 9cc272b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions cacher.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@ type SimpleCacher interface {
// ContextCacher interface.
type ContextCacher interface {
SimpleCacher
// WithContext and clone new cacher
WithContext(ctx context.Context) ContextCacher
}

// ContextOpCacher interface.
type ContextOpCacher interface {
SimpleCacher

// HasWithCtx basic operation
HasWithCtx(ctx context.Context, key string) bool
Expand Down

0 comments on commit 9cc272b

Please sign in to comment.