Documentation
¶
Index ¶
- Constants
- func Delete(c *Conn, key string) error
- func DeleteByTags(c *Conn, tags ...string) error
- func FKey(prefix string, key any) string
- func Get[T any](c *Conn, key string) (T, error)
- func Set[T any](c *Conn, key string, value T, ttl time.Duration, tags ...string) error
- func SetKA[T any](c *Conn, key string, value T, tags ...string) error
- type Conn
- func (c *Conn) GoCache() *redis_store.RedisStore
- func (c *Conn) RDelete(key string) error
- func (c *Conn) RDeleteByPrefix(prefix string) error
- func (c *Conn) RExists(key string) (bool, error)
- func (c *Conn) RGet(key string) (string, error)
- func (c *Conn) RSet(key string, value any, ttl time.Duration) error
Constants ¶
View Source
const ( DAAttachment = "attachment" DAUser = "account" DARealm = "realm" )
Those constants are used to directly get the cached data from redis Formatted like {prefix}#{key}
Variables ¶
This section is empty.
Functions ¶
func DeleteByTags ¶
Types ¶
type Conn ¶
type Conn struct {
Rd *redis.Client
Timeout time.Duration
// contains filtered or unexported fields
}
func (*Conn) GoCache ¶
func (c *Conn) GoCache() *redis_store.RedisStore
func (*Conn) RDeleteByPrefix ¶
ClearCacheByPrefix deletes all keys matching a given prefix
Click to show internal directories.
Click to hide internal directories.