Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithKeyGenerator ¶
func WithKeyGenerator(keyGenerator key.KeyGenerator) keyGeneratorOption
func WithLocalCache ¶
func WithLocalCache(localCache cache.LocalCache) localCacheOption
Types ¶
type CacheEngine ¶
type CacheEngine struct {
// contains filtered or unexported fields
}
func New ¶
func New(redisCli RedisClient, opts ...Option) *CacheEngine
type RedisClient ¶
type RedisClient interface { Set(ctx context.Context, key string, value any, ttl time.Duration) *redis.StatusCmd SetXX(ctx context.Context, key string, value any, ttl time.Duration) *redis.BoolCmd SetNX(ctx context.Context, key string, value any, ttl time.Duration) *redis.BoolCmd Get(ctx context.Context, key string) *redis.StringCmd Del(ctx context.Context, keys ...string) *redis.IntCmd }
Click to show internal directories.
Click to hide internal directories.