Documentation ¶
Index ¶
- type BadgerCache
- func (bc *BadgerCache) Empty() error
- func (bc *BadgerCache) EmptyByMatch(str string) error
- func (bc *BadgerCache) Exists(str string) (bool, error)
- func (bc *BadgerCache) Get(str string) (interface{}, error)
- func (bc *BadgerCache) Remove(str string) error
- func (bc *BadgerCache) Set(str string, val interface{}, expiry ...int) error
- type Cache
- type Entry
- type RedisCache
- func (f *RedisCache) Empty() error
- func (f *RedisCache) EmptyByMatch(str string) error
- func (f *RedisCache) Exists(str string) (bool, error)
- func (f *RedisCache) Get(str string) (interface{}, error)
- func (f *RedisCache) Remove(str string) error
- func (f *RedisCache) Set(str string, val interface{}, expiry ...int) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BadgerCache ¶
type BadgerCache struct { Conn *badger.DB Prefix string }
func (*BadgerCache) Empty ¶
func (bc *BadgerCache) Empty() error
func (*BadgerCache) EmptyByMatch ¶
func (bc *BadgerCache) EmptyByMatch(str string) error
func (*BadgerCache) Get ¶
func (bc *BadgerCache) Get(str string) (interface{}, error)
func (*BadgerCache) Remove ¶
func (bc *BadgerCache) Remove(str string) error
type RedisCache ¶
type RedisCache struct { Conn *redis.Pool Prefix string // used to prefix keys with something unique in case they share the same ids }
func (*RedisCache) Empty ¶
func (f *RedisCache) Empty() error
func (*RedisCache) EmptyByMatch ¶
func (f *RedisCache) EmptyByMatch(str string) error
func (*RedisCache) Get ¶
func (f *RedisCache) Get(str string) (interface{}, error)
func (*RedisCache) Remove ¶
func (f *RedisCache) Remove(str string) error
Click to show internal directories.
Click to hide internal directories.