Versions in this module Expand all Collapse all v0 v0.1.1 Jul 14, 2024 v0.1.0 Jul 13, 2024 Changes in this version + func WithKeyGenerator(keyGenerator key.KeyGenerator) keyGeneratorOption + func WithLocalCache(localCache cache.LocalCache) localCacheOption + type CacheEngine struct + func New(redisCli RedisClient, opts ...Option) *CacheEngine + func (e *CacheEngine) Get(ctx context.Context, key string, req *http.Request) (*http.Response, bool, error) + func (e *CacheEngine) Key(req *http.Request) (key string, err error) + func (e *CacheEngine) Set(ctx context.Context, key string, res *http.Response, ttl time.Duration) error + type Option interface + type RedisClient interface + Del func(ctx context.Context, keys ...string) *redis.IntCmd + Get func(ctx context.Context, key string) *redis.StringCmd + Set func(ctx context.Context, key string, value any, ttl time.Duration) *redis.StatusCmd + SetNX func(ctx context.Context, key string, value any, ttl time.Duration) *redis.BoolCmd + SetXX func(ctx context.Context, key string, value any, ttl time.Duration) *redis.BoolCmd