cache

package
v0.0.0-...-c46b1a5 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache struct {
	Client *redis.Client
	Config Config
}

func New

func New() *Cache

func (*Cache) Close

func (c *Cache) Close() error

func (*Cache) Contains

func (c *Cache) Contains(k string) (bool, error)

func (*Cache) Delete

func (c *Cache) Delete(k string) (int, error)

func (*Cache) Get

func (c *Cache) Get(i interface{}, k string) error

func (*Cache) Ping

func (c *Cache) Ping() (string, error)

func (*Cache) Set

func (c *Cache) Set(i interface{}, k string) (string, error)

type Config

type Config struct {
	Lifetime int
}

Jump to

Keyboard shortcuts

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