memorycachestore

package
v0.0.0-...-919b350 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MemoryCacheStore

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

MemoryCacheStore is in-memory store for HTTPCache.

It's implemented with a sync.Map. This implementation does not expire cache entries and cache size is not limited.

func NewMemoryCacheStore

func NewMemoryCacheStore() *MemoryCacheStore

NewMemoryCacheStore instantiates new MemoryCacheStore.

func (*MemoryCacheStore) Load

func (m *MemoryCacheStore) Load(key string) (*cachestore.Response, error)

Load retrieves a cache entry from the store.

func (*MemoryCacheStore) Save

func (m *MemoryCacheStore) Save(key string, response *cachestore.Response) error

Save saves a cache entry to store.

Jump to

Keyboard shortcuts

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