Documentation
¶
Index ¶
- type CacheClient
- func (c *CacheClient) Close() error
- func (c *CacheClient) DeleteKey(ctx context.Context, key string) error
- func (c *CacheClient) Flush() *cacheFlush
- func (c *CacheClient) Get() *cacheGet
- func (c *CacheClient) GetBytes(ctx context.Context, key string) ([]byte, bool, error)
- func (c *CacheClient) InvalidatePrefix(ctx context.Context, prefix string) error
- func (c *CacheClient) Set() *cacheSet
- func (c *CacheClient) SetBytes(ctx context.Context, key string, value []byte, ttl time.Duration) error
- type OtterStore
- func (s *OtterStore) Close() error
- func (s *OtterStore) Delete(key string) error
- func (s *OtterStore) Get(key string) ([]byte, bool)
- func (s *OtterStore) InvalidatePrefix(prefix string) error
- func (s *OtterStore) InvalidateTags(tags []string) error
- func (s *OtterStore) Set(key string, value []byte, ttl time.Duration) error
- func (s *OtterStore) SetTags(key string, tags []string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CacheClient ¶
type CacheClient struct {
// Client stores the client to the underlying cache service
Client *redis.Client
// contains filtered or unexported fields
}
CacheClient is the client that allows you to interact with the cache
func NewCacheClient ¶
func NewCacheClient(cfg *config.Config) (*CacheClient, error)
NewCacheClient is a temporary compatibility alias during the app-to-framework move.
func NewClient ¶
func NewClient(cfg *config.Config) (*CacheClient, error)
NewClient creates a new cache client.
func (*CacheClient) Close ¶
func (c *CacheClient) Close() error
Close closes the connection to the cache
func (*CacheClient) DeleteKey ¶
func (c *CacheClient) DeleteKey(ctx context.Context, key string) error
func (*CacheClient) Flush ¶
func (c *CacheClient) Flush() *cacheFlush
Flush creates a cache flush operation
func (*CacheClient) InvalidatePrefix ¶
func (c *CacheClient) InvalidatePrefix(ctx context.Context, prefix string) error
type OtterStore ¶
type OtterStore struct {
// contains filtered or unexported fields
}
func NewOtterStore ¶
func NewOtterStore(capacity int) (*OtterStore, error)
func (*OtterStore) Close ¶
func (s *OtterStore) Close() error
func (*OtterStore) Delete ¶
func (s *OtterStore) Delete(key string) error
func (*OtterStore) InvalidatePrefix ¶
func (s *OtterStore) InvalidatePrefix(prefix string) error
func (*OtterStore) InvalidateTags ¶
func (s *OtterStore) InvalidateTags(tags []string) error
func (*OtterStore) SetTags ¶
func (s *OtterStore) SetTags(key string, tags []string)
Click to show internal directories.
Click to hide internal directories.