Versions in this module Expand all Collapse all v1 v1.0.0 Mar 21, 2023 Changes in this version + const NanosecondsPerMillisecond + const TTLNever + var ErrNotFound = errors.New("Key not found") + func Hash(s string) string + type KeyValueStore interface + Del func(key string) error + FlushDB func() error + Get func(key string) (string, error) + Set func(key, value string, ttl time.Duration) error + func NewDefaultMemoryStore() KeyValueStore + func NewDefaultRedisStore() (KeyValueStore, error) + type MemoryKeyValueStore struct + Cache *gocache.Cache + func NewMemoryKeyValueStore(cleanupInterval time.Duration) *MemoryKeyValueStore + func (store *MemoryKeyValueStore) Del(key string) error + func (store *MemoryKeyValueStore) FlushDB() error + func (store *MemoryKeyValueStore) Get(key string) (string, error) + func (store *MemoryKeyValueStore) Set(key, value string, ttl time.Duration) error + type RedisStore struct + func NewRedisStore(ns string, host string, password string) (*RedisStore, error) + func NewRedisStoreFromPool(ns string, pool *redis.Pool) *RedisStore + func (rs *RedisStore) Del(key string) error + func (rs *RedisStore) FlushDB() error + func (rs *RedisStore) Get(key string) (string, error) + func (rs *RedisStore) Set(key, value string, ttl time.Duration) error