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