cache

package
v0.0.0-...-a78f517 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func QueryDBWithCache

func QueryDBWithCache[T any](c *Cache, name string, queryDB func() (T, error)) (T, error)

Types

type Cache

type Cache struct {
	// contains filtered or unexported fields
}

func New

func New(conf config.CacheConf) (*Cache, error)

func (*Cache) Close

func (cache *Cache) Close()

func (*Cache) DelCache

func (c *Cache) DelCache(name ...string) (err error)

func (*Cache) FindCache

func (c *Cache) FindCache(name string, dest any) error

func (*Cache) StoreCache

func (c *Cache) StoreCache(source any, name ...string) (err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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