cache

package
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

* @Author: i@douxuefeng.cn * @Date: 2022-05-14 15:59:22 * @LastEditTime: 2022-05-14 15:59:26 * @LastEditors: i@douxuefeng.cn * @Description: * @FilePath: \go-utils\cache\cache.go

* @Author: i@douxuefeng.cn * @Date: 2021-10-31 16:32:16 * @LastEditTime: 2022-05-28 14:23:07 * @LastEditors: i@douxuefeng.cn * @Description: * @FilePath: \go-utils\cache\redis.go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitRedis

func InitRedis(opt *RedisOpt)

func NewRedisConn added in v0.2.0

func NewRedisConn() *redisPool

Types

type Cache

type Cache interface {
	Get(key string) (string, error)
	Set(key string, data string, timeout int64) error
	IsExist(key string) bool
	Del(key string) error
}

type RedisOpt

type RedisOpt struct {
	Host        string
	Password    string
	Database    int
	MaxIdle     int
	MaxActive   int
	IdleTimeout int //second
}

Jump to

Keyboard shortcuts

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