cache

package
v1.29.8 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2025 License: AGPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGet

func NewGet(c *config.Config) (pipeline.Filter, error)

func NewSet

func NewSet(c *config.Config) (pipeline.Filter, error)

Types

type Config

type Config struct {
	CacheType       string   `config:"cache_type"`
	PassPatterns    []string `config:"pass_patterns"`
	ValidatedStatus []int    `config:"validated_status_code"`
	MinResponseSize int      `config:"min_response_size"`
	MaxResponseSize int      `config:"max_response_size"`

	RedisHost string `config:"redis_host"`
	RedisPort int    `config:"redis_port"`

	MaxCachedSize int64 `config:"max_cached_size"`
	MaxCachedItem int64 `config:"max_cached_item"`

	AsyncSearchCacheTTL string `config:"async_search_cache_ttl"`
	CacheTTL            string `config:"cache_ttl"`
	// contains filtered or unexported fields
}

type RequestCache

type RequestCache struct {
	// contains filtered or unexported fields
}

func (*RequestCache) GetCache

func (p *RequestCache) GetCache(key string) ([]byte, bool)

func (*RequestCache) SetCache

func (p *RequestCache) SetCache(key string, data []byte, ttl time.Duration)

type RequestCacheGet

type RequestCacheGet struct {
	RequestCache
	// contains filtered or unexported fields
}

func (*RequestCacheGet) Filter

func (filter *RequestCacheGet) Filter(ctx *fasthttp.RequestCtx)

func (*RequestCacheGet) Name

func (filter *RequestCacheGet) Name() string

type RequestCacheSet

type RequestCacheSet struct {
	RequestCache

	Type           string `config:"type"` //redis,local
	TTL            string `config:"ttl"`
	AsyncSearchTTL string `config:"async_search_ttl"`
	// contains filtered or unexported fields
}

func (*RequestCacheSet) Filter

func (filter *RequestCacheSet) Filter(ctx *fasthttp.RequestCtx)

func (*RequestCacheSet) GetChaosTTLDuration

func (filter *RequestCacheSet) GetChaosTTLDuration() time.Duration

func (*RequestCacheSet) Name

func (filter *RequestCacheSet) Name() string

Jump to

Keyboard shortcuts

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