package cache import ( "context" "errors" "time" ) var ( ErrorCache = errors.New("cache error") ErrorCacheNotFound = errors.New("cache not found") ) var ( Redis = "redis" Memory = "memory" ) type Cache interface { Set(ctx context.Context, key, val string, t time.Duration) (bool, error) Get(ctx context.Context, key string) (string, error) Delete(ctx context.Context, key string) (bool, error) }