Documentation
¶
Index ¶
- type Cache
- func (c *Cache) Read(key string) ([]byte, error)
- func (c *Cache) ReadAny(key string, output any) error
- func (c *Cache) ReadStrings(key string) ([]string, error)
- func (c *Cache) ReadUint64(key string) (uint64, error)
- func (c *Cache) Remove(key string) error
- func (c *Cache) RemoveAll() error
- func (c *Cache) Store(key string, value []byte) error
- func (c *Cache) StoreAny(key string, value any) error
- func (c *Cache) StoreStrings(key string, value []string) error
- func (c *Cache) StoreUint64(key string, value uint64) error
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
func (*Cache) ReadAny ¶
The second argument must be a reference to the a variable of the stored type Ex: output := []Mystruct{}
err := c.ReadAny("TEST_KEY", &output)
func (*Cache) ReadStrings ¶
Uses `\n` as delimiter
func (*Cache) StoreStrings ¶
Uses `\n` as delimiter
Click to show internal directories.
Click to hide internal directories.