httpcache

package
v2.16.24 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2026 License: Apache-2.0, Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package httpcache introduces an in-memory-cached http client into the KrakenD stack

Index

Constants

View Source
const Namespace = "github.com/devopsfaith/krakend-httpcache"

Namespace is the key to use to store and access the custom config data

Variables

This section is empty.

Functions

func NewHTTPClient

NewHTTPClient creates a HTTPClientFactory using an in-memory-cached http client

Types

type Cache

type Cache interface {
	// Get returns the []byte representation of a cached response and a bool
	// set to true if the value isn't empty
	Get(key string) (responseBytes []byte, ok bool)
	// Set stores the []byte representation of a response against a key
	Set(key string, responseBytes []byte)
	// Delete removes the value associated with the key
	Delete(key string)
}

Jump to

Keyboard shortcuts

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