Documentation
¶
Index ¶
- func NewRedisClient(addr, pw string, db int) *redis.Client
- func SetCacheJSON(ctx context.Context, cache *Storage, key string, value any, ttl time.Duration)
- type Storage
- func (s *Storage) Delete(ctx context.Context, key string) error
- func (s *Storage) DeleteByPattern(ctx context.Context, pattern string) error
- func (s *Storage) DeleteByPrefixes(ctx context.Context, prefixes ...string) error
- func (s *Storage) Get(ctx context.Context, key string) (string, error)
- func (s *Storage) Ping(ctx context.Context) error
- func (s *Storage) Set(ctx context.Context, key string, value string, ttl time.Duration) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
func NewRedisStorage ¶
func (*Storage) DeleteByPattern ¶
func (*Storage) DeleteByPrefixes ¶
Click to show internal directories.
Click to hide internal directories.