cache

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Falco's interpreter cacheing is simply in-memory

Index

Constants

View Source
const (
	LocalDatacenterString = "cache-localsimulator-FALCO"
)

Variables

This section is empty.

Functions

func IsCacheableStatusCode

func IsCacheableStatusCode(statusCode int) bool

Types

type Cache

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

func New

func New() *Cache

func (*Cache) Get

func (c *Cache) Get(hash string) *CacheItem

func (*Cache) Set

func (c *Cache) Set(hash string, item *CacheItem)

type CacheItem

type CacheItem struct {
	Response  *http.Response
	Expires   time.Time
	EntryTime time.Time
	Hits      int
	LastUsed  time.Duration
	// contains filtered or unexported fields
}

func (*CacheItem) Update

func (i *CacheItem) Update(d time.Duration)

Jump to

Keyboard shortcuts

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