Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CacheFactory ¶
type CacheFactory interface {
NewCache(key string, ttl time.Duration) cache.GenericCache
NewStore(key string, ttl time.Duration) store.GenericInterface
}
func NewMemCacheFactory ¶
func NewMemCacheFactory() CacheFactory
func NewRedisCacheFactory ¶
func NewRedisCacheFactory(rc redis.Client) CacheFactory
type MemCacheFactory ¶
type MemCacheFactory struct{}
func (*MemCacheFactory) NewCache ¶
func (f *MemCacheFactory) NewCache(key string, ttl time.Duration) cache.GenericCache
func (*MemCacheFactory) NewStore ¶
func (f *MemCacheFactory) NewStore(key string, ttl time.Duration) store.GenericInterface
type RedisCacheFactory ¶
type RedisCacheFactory struct {
// contains filtered or unexported fields
}
func (*RedisCacheFactory) NewCache ¶
func (f *RedisCacheFactory) NewCache(key string, ttl time.Duration) cache.GenericCache
func (*RedisCacheFactory) NewStore ¶
func (f *RedisCacheFactory) NewStore(key string, ttl time.Duration) store.GenericInterface
Click to show internal directories.
Click to hide internal directories.