cache

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyResponse

func CopyResponse(resp *http.Response) *http.Response

func CreateCacheKey

func CreateCacheKey(req *http.Request) string

Types

type Cache

type Cache interface {
	Get(key string) *http.Response
	Set(key string, value *http.Response)
	Delete(key string)
	Clear()
}

func NewCache

func NewCache(ttl, cleanWindow time.Duration, maxCacheSizeMB int) (Cache, error)

func NewNopCache

func NewNopCache() Cache

Jump to

Keyboard shortcuts

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