cache

package
v0.0.0-...-a439f4a Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetConfig

func SetConfig(c *Config)

func WithCache

func WithCache(ctx context.Context, cache *Cache) context.Context

Types

type Cache

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

func DefaultCache

func DefaultCache() *Cache

func FromContext

func FromContext(ctx context.Context) *Cache

func (*Cache) Delete

func (c *Cache) Delete(key string) error

func (*Cache) Get

func (c *Cache) Get(key string, value interface{}) error

func (*Cache) Set

func (c *Cache) Set(key string, value interface{}, expires time.Duration) error

type Config

type Config struct {
	Size int
}

Jump to

Keyboard shortcuts

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