kos/pkg/cache/cache.go

14 lines
290 B
Go

package cache
import (
"context"
"time"
)
type Cache interface {
Set(ctx context.Context, key string, value any)
SetEx(ctx context.Context, key string, value any, expire time.Duration)
Get(ctx context.Context, key string) (value any, ok bool)
Del(ctx context.Context, key string)
}