cache

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2021 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