cache

package
v0.0.0-...-870ec01 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CacheGetRequest

func CacheGetRequest(ctx context.Context, uri string, cacheDuration time.Duration, errorCacheDuration time.Duration, headers ...struct {
	Key   string
	Value string
}) (*cachedGetRequest, error)

Send a GET request to an endpoint and cache the result

func GetCollectionSize

func GetCollectionSize(ctx context.Context, collection string, q interface{}, opts ...*options.CountOptions) (int64, error)

Gets the collection size then caches it in redis for some time

Types

This section is empty.

Jump to

Keyboard shortcuts

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