cache

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 13, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

func Delete(pool *redis.Pool, key string) error

func Exists

func Exists(pool *redis.Pool, key string) (bool, error)

func Get

func Get(pool *redis.Pool, key string) (string, error)

func HDelete

func HDelete(pool *redis.Pool, key, field string) error

func HGet

func HGet(pool *redis.Pool, key, field string) (string, error)

func HSet

func HSet(pool *redis.Pool, key, field, value string) error

func Set

func Set(pool *redis.Pool, key, value string, expire int32) error

func SetEx

func SetEx(pool *redis.Pool, key, value string, expire int32) error

func SetNx

func SetNx(pool *redis.Pool, key, value string, expire int32) error

Types

type Cache

type Cache struct {
}

func NewCache

func NewCache() *Cache

func (*Cache) BuildKey

func (c *Cache) BuildKey(key string) string

func (*Cache) Delete

func (c *Cache) Delete(redisConn redis.Conn, key string) error

func (*Cache) Exists

func (c *Cache) Exists(redisConn redis.Conn, key string) (bool, error)

func (*Cache) Get

func (c *Cache) Get(redisConn redis.Conn, key string) (string, error)

func (*Cache) HDelete

func (c *Cache) HDelete(redisConn redis.Conn, key, field string) error

func (*Cache) HGet

func (c *Cache) HGet(redisConn redis.Conn, key, field string) (string, error)

func (*Cache) HSet

func (c *Cache) HSet(redisConn redis.Conn, key, field, value string) error

func (*Cache) Set

func (c *Cache) Set(redisConn redis.Conn, key, value string, expire int32) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL