cache

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NoSpecialDur time.Duration

Functions

This section is empty.

Types

type Cache

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

func New

func New(prefix string, loader Loader, cacheDuration time.Duration) *Cache

func (*Cache) Get

func (c *Cache) Get(key string, r *http.Request) (value interface{})

type Loader

type Loader func(key string, r *http.Request) (interface{}, time.Duration, error)

Jump to

Keyboard shortcuts

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