Versions in this module Expand all Collapse all v1 v1.0.0 May 12, 2023 Changes in this version + func EnableCache() fx.Option + func NewMemoryStore(properties MemoryCacheProperties) (store.StoreInterface, error) + func NewRedisStore(properties RedisCacheProperties) (store.StoreInterface, error) + func NewStore(properties *CacheProperties) (store.StoreInterface, error) + type Cache struct + func NewCache(properties *CacheProperties) (*Cache, error) + func (c *Cache) AsyncSet(key string, value interface{}, duration time.Duration) + func (c *Cache) Clear() error + func (c *Cache) Delete(key string) error + func (c *Cache) Exist(key string) bool + func (c *Cache) Get(key string) (interface{}, error) + func (c *Cache) Remember(key string, duration time.Duration, fn func() (interface{}, error)) (interface{}, error) + func (c *Cache) Set(key string, value interface{}, duration time.Duration) error + type CacheProperties struct + Driver string + Memory MemoryCacheProperties + Redis RedisCacheProperties + func NewCacheProperties(loader config.Loader) (*CacheProperties, error) + func (t *CacheProperties) Prefix() string + type MemoryCacheProperties struct + CleanupInterval time.Duration + DefaultExpiration time.Duration + type RedisCacheProperties struct + Database int + EnableTLS bool + Host string + Password string + Port int + User string