Documentation ¶
Index ¶
- type Config
- type InMemory
- func (c *InMemory) Count() int
- func (c *InMemory) Del(key string) error
- func (c *InMemory) Flush()
- func (c *InMemory) Get(key string) (interface{}, error)
- func (c *InMemory) Items() map[string]cache.Item
- func (c *InMemory) Set(key string, value interface{}) error
- func (c *InMemory) WithExpiration(d time.Duration) *InMemory
- type Redis
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { REDIS_ON bool `env:"REDIS_ON" envDefault:"false" json:"redis_on"` REDIS_HOST string `env:"REDIS_HOST" envDefault:"localhost" json:"redis_host"` REDIS_PORT string `env:"REDIS_PORT" envDefault:"6379" json:"redis_port"` REDIS_PASS string `env:"REDIS_PASS" envDefault:"" json:"redis_pass"` }
type InMemory ¶ added in v1.0.1
type InMemory struct {
// contains filtered or unexported fields
}
InMemory is an implementation of the cache interface which stores values in-memory.
func NewInMemory ¶ added in v1.0.1
func NewInMemory() *InMemory
NewInMemory creates a new InMemory instance with default values.
func (*InMemory) Get ¶ added in v1.0.1
Get retrieves a value from the InMemory cache implementation.
Click to show internal directories.
Click to hide internal directories.