cache

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuntConnect

func BuntConnect(key string) (db *buntdb.DB, err error)

BuntConnect connects to database BuntDB - used for caching

func BuntGet

func BuntGet(key string, w http.ResponseWriter) (cacheExist bool)

BuntGet downloads the data - if any - that is in the buntdb (embedded cache database) using response.URL.String() as key

func BuntSet

func BuntSet(key, value string)

BuntSet sets data as cache in buntdb (embedded cache database) using response.URL.String() as key

func EndpointRules

func EndpointRules(uri string) (cacheEnable bool, time int)

EndpointRules checks if there is a custom caching rule for the endpoint

Types

This section is empty.

Jump to

Keyboard shortcuts

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