cache

package
v0.0.0-...-087457d Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIResponse

type APIResponse struct {
	Headers  http.Header
	Response []byte
}

type Cache

type Cache interface {
	Get(ctx context.Context, key string, duration time.Duration) ([]byte, error)
	Set(ctx context.Context, key string, content []byte, duration time.Duration) error
}

type RequestOptions

type RequestOptions struct {
	ForceRefresh bool
	// CRTimeRoundingFactor is used to calculate cache expiration time
	CRTimeRoundingFactor time.Duration
	// SkipCacheWrites will disable setting keys in the cache. Used in some scenarios where a lot of data is in play and serves no purpose being in the cache.
	SkipCacheWrites bool
}

RequestOptions specifies options for an individual request, such as forcing the cache to be bypassed.

Jump to

Keyboard shortcuts

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