Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterFactory ¶ added in v1.1.5
Types ¶
type Factory ¶ added in v1.1.5
func NewRedisFactory ¶ added in v1.1.5
func NewRedisFactory(client *redis.Client) Factory
type MemoryStore ¶
type MemoryStore struct {
// contains filtered or unexported fields
}
func NewMemoryStore ¶
func NewMemoryStore() *MemoryStore
type RedisStore ¶
type RedisStore struct {
// contains filtered or unexported fields
}
func NewRedisStore ¶
func NewRedisStore(options *cache.Options) *RedisStore
type Store ¶
type Store interface { // Set an item in the store. Set(ctx context.Context, key string, value any, TTL time.Duration) error // Get an item from the store. // returns an error if key is not found or there is other problems. Get(ctx context.Context, key string, value any) error // Check if a key exist in the store. Has(ctx context.Context, key string) bool }
Interface to a cache storage.
Click to show internal directories.
Click to hide internal directories.