Documentation ¶
Index ¶
- Constants
- type RueidisStore
- func (s *RueidisStore) Clear(ctx context.Context) error
- func (s *RueidisStore) Delete(ctx context.Context, key any) error
- func (s *RueidisStore) Get(ctx context.Context, key any) (any, error)
- func (s *RueidisStore) GetType() string
- func (s *RueidisStore) GetWithTTL(ctx context.Context, key any) (any, time.Duration, error)
- func (s *RueidisStore) Invalidate(ctx context.Context, options ...lib_store.InvalidateOption) error
- func (s *RueidisStore) Set(ctx context.Context, key any, value any, options ...lib_store.Option) error
Constants ¶
View Source
const ( // RueidisType represents the storage type as a string value RueidisType = "rueidis" // RueidisTagPattern represents the tag pattern to be used as a key in specified storage RueidisTagPattern = "gocache_tag_%s" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RueidisStore ¶
type RueidisStore struct {
// contains filtered or unexported fields
}
RueidisStore is a store for Redis
func NewRueidis ¶
func NewRueidis(client rueidis.Client, options ...lib_store.Option) *RueidisStore
NewRueidis creates a new store to Redis instance(s)
func (*RueidisStore) Clear ¶
func (s *RueidisStore) Clear(ctx context.Context) error
Clear resets all data in the store
func (*RueidisStore) Delete ¶
func (s *RueidisStore) Delete(ctx context.Context, key any) error
Delete removes data from Redis for given key identifier
func (*RueidisStore) GetType ¶
func (s *RueidisStore) GetType() string
GetType returns the store type
func (*RueidisStore) GetWithTTL ¶
GetWithTTL returns data stored from a given key and its corresponding TTL
func (*RueidisStore) Invalidate ¶
func (s *RueidisStore) Invalidate(ctx context.Context, options ...lib_store.InvalidateOption) error
Invalidate invalidates some cache data in Redis for given options
Click to show internal directories.
Click to hide internal directories.