lrucache

package
v0.0.0-...-726f7ef Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

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

Cache represents an LRU cache

func New

func New(config *libqpu.QPUConfig) *Cache

New creates a cache instance

func (*Cache) Get

func (c *Cache) Get(key string) (*qpuextapi.QueryResp, bool)

Get retrieves an entry from the cache

func (*Cache) Invalidate

func (c *Cache) Invalidate(key string)

Invalidate ..

func (*Cache) Put

func (c *Cache) Put(key string, response *qpuextapi.QueryResp, size int, client libqpu.APIClient) error

Put stores an object in a cache entry

func (*Cache) WaitInvalidate

func (c *Cache) WaitInvalidate(stream qpuapi.QPUAPI_QuerySubscribeClient, cancel context.CancelFunc, key string)

WaitInvalidate ...

func (*Cache) WaitInvalidation

func (c *Cache) WaitInvalidation(key string)

WaitInvalidation ..

Jump to

Keyboard shortcuts

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