httpcache

package module
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2026 License: MIT Imports: 13 Imported by: 0

README

Go HTTP client wrapper that caches responses in Redis.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPClientCacheRedis

type HTTPClientCacheRedis struct {
	Config HTTPClientCacheRedisConfig
	Client interface {
		Do(req *http.Request) (*http.Response, error)
	}
	Redis *redis.Client
}

HTTPClientCacheRedis caches HTTP responses in Redis, including body, headers, and status code.

func (HTTPClientCacheRedis) Do

type HTTPClientCacheRedisConfig

type HTTPClientCacheRedisConfig struct {
	RedisPrefix string        `json:"redis_prefix"`
	MinTTL      time.Duration `json:"min_ttl,format:units"`
}

func (HTTPClientCacheRedisConfig) WithDefaults

Jump to

Keyboard shortcuts

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