Documentation
¶
Index ¶
- type Config
- type InMemoryCache
- func (imc *InMemoryCache) Delete(ctx context.Context, key string) error
- func (imc *InMemoryCache) Flush(ctx context.Context)
- func (imc *InMemoryCache) Get(ctx context.Context, key string) (interface{}, error)
- func (imc *InMemoryCache) Set(ctx context.Context, key string, value string, ttl time.Duration) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InMemoryCache ¶
type InMemoryCache struct {
// contains filtered or unexported fields
}
InMemoryCache holds the handler for the in-memory cache using go-cache
func NewCache ¶
func NewCache(config *Config) (*InMemoryCache, error)
InMemoryCacheConfig is the configuration for the in-memory cache
func (*InMemoryCache) Delete ¶
func (imc *InMemoryCache) Delete(ctx context.Context, key string) error
Delete implements Cache.
func (*InMemoryCache) Flush ¶
func (imc *InMemoryCache) Flush(ctx context.Context)
Flushes out all the keys from Cache.
Click to show internal directories.
Click to hide internal directories.