aurestcaching

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2022 License: MIT Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(
	wrapped aurestclientapi.Client,
	useCacheCondition aurestclientapi.CacheConditionCallback,
	storeResponseInCacheCondition aurestclientapi.CacheResponseConditionCallback,
	cacheKeyFunction aurestclientapi.CacheKeyFunction,
	retentionTime time.Duration,
	cacheSize int,
) aurestclientapi.Client

Types

type CacheEntry

type CacheEntry struct {
	Recorded           time.Time
	ResponseHeaderJson []byte
	ResponseBodyJson   []byte
	ResponseStatus     int
}

type CachingImpl

type CachingImpl struct {
	Wrapped aurestclientapi.Client

	UseCacheCondition             aurestclientapi.CacheConditionCallback
	StoreResponseInCacheCondition aurestclientapi.CacheResponseConditionCallback
	CacheKeyFunction              aurestclientapi.CacheKeyFunction
	RetentionTime                 time.Duration
	Cache                         *tinylru.LRU
}

func (*CachingImpl) Perform

func (c *CachingImpl) Perform(ctx context.Context, method string, requestUrl string, requestBody interface{}, response *aurestclientapi.ParsedResponse) error

Jump to

Keyboard shortcuts

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