cache

package
v0.0.0-...-e10842c Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2023 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 {
	// contains filtered or unexported fields
}

Cache is an exported cache object

func Init

func Init(c *cfg.Cache) (*Cache, error)

Init creates a new redis cache

func (*Cache) Add

func (c *Cache) Add(ctx context.Context, key string, value string) (string, error)

Add inserts items to cache

func (*Cache) Del

func (c *Cache) Del(ctx context.Context, key string) (string, error)

Del removes items from cache given key

func (*Cache) Get

func (c *Cache) Get(ctx context.Context, key string) (string, error)

Get returns items from cache given key

Jump to

Keyboard shortcuts

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