Documentation ¶
Index ¶
- type BadgerCache
- func (b *BadgerCache) Clean() error
- func (b *BadgerCache) Delete(str string) error
- func (b *BadgerCache) DeleteIfMatch(str string) error
- func (b *BadgerCache) Exists(str string) (bool, error)
- func (b *BadgerCache) Get(str string) (interface{}, error)
- func (b *BadgerCache) Set(str string, value interface{}, expires ...int) error
- type Cache
- type Entry
- type RedisCache
- func (c *RedisCache) Clean() error
- func (c *RedisCache) Delete(str string) error
- func (c *RedisCache) DeleteIfMatch(str string) error
- func (c *RedisCache) Exists(str string) (bool, error)
- func (c *RedisCache) Get(str string) (interface{}, error)
- func (c *RedisCache) Set(str string, value interface{}, expires ...int) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BadgerCache ¶
type BadgerCache struct { Connection *badger.DB Prefix string }
func (*BadgerCache) Clean ¶
func (b *BadgerCache) Clean() error
func (*BadgerCache) Delete ¶
func (b *BadgerCache) Delete(str string) error
func (*BadgerCache) DeleteIfMatch ¶
func (b *BadgerCache) DeleteIfMatch(str string) error
func (*BadgerCache) Get ¶
func (b *BadgerCache) Get(str string) (interface{}, error)
type RedisCache ¶
func (*RedisCache) Clean ¶
func (c *RedisCache) Clean() error
Clean : Delete all entries from redis.
func (*RedisCache) Delete ¶
func (c *RedisCache) Delete(str string) error
Delete : Delete a key value in Redis.
func (*RedisCache) DeleteIfMatch ¶
func (c *RedisCache) DeleteIfMatch(str string) error
DeleteIfMatch : Delete a key values where match the with the key value
func (*RedisCache) Exists ¶
func (c *RedisCache) Exists(str string) (bool, error)
Exists : Check if the key exists
func (*RedisCache) Get ¶
func (c *RedisCache) Get(str string) (interface{}, error)
Get : Return Key values from Redis if it exists.
Click to show internal directories.
Click to hide internal directories.