factory

package
v1.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 5, 2025 License: MIT Imports: 4 Imported by: 0

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL