Documentation ¶
Index ¶
Constants ¶
View Source
const ( // DefaultExpirationTime is the default expiration time for cache entries DefaultExpirationTime = 600 CleanWindowMinutes = 5 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LocalCache ¶
type LocalCache interface { Get(key string, value interface{}) (bool, error) Set(key string, value interface{}) error Delete(key string) error }
func NewLocalCache ¶
func NewLocalCache(ctx context.Context, expirationTime uint64) (LocalCache, error)
type RedisCache ¶
type RedisCache interface { Get(ctx context.Context, key string, value interface{}) (bool, error) Set(ctx context.Context, key string, value interface{}) error Delete(ctx context.Context, key string) error CFReserve(ctx context.Context, key string, capacity, bucketSize, maxIterations int64) error CFExist(ctx context.Context, key string, value interface{}) (bool, error) CFAdd(ctx context.Context, key string, value interface{}) error CFDel(ctx context.Context, key string, value interface{}) error GetMutex(mutexName string) *redsync.Mutex ExecIncrbyXPipeline(ctx context.Context, payloads *[]RedisIncrbyXPayload) error }
func NewRedisCache ¶
func NewRedisCache(client redis.UniversalClient, expirationTime time.Duration) RedisCache
type RedisIncrbyXPayload ¶
Click to show internal directories.
Click to hide internal directories.