forward_lru_cache

package
v0.0.0-...-2f1e84d Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2017 License: MIT Imports: 3 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package lru provides an lru cache algorithm over an existing cache.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(c httpcache.Cache, cap int) httpcache.Cache

New creates a new Cache with c as its underlying storage and a capacity of cap bytes.

Types

type Cache

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

Cache is an LRU cache. It is safe for concurrent access. It itself uses a cache for its underlying storage.

func (*Cache) Action

func (c *Cache) Action(name string, args ...interface{}) (map[string]*interface{}, error)

func (*Cache) Debug

func (c *Cache) Debug(action string)

func (*Cache) Delete

func (c *Cache) Delete(key string)

Delete removes the provided key from the cache.

func (*Cache) Get

func (c *Cache) Get(key string) (resp []byte, ok bool)

Get looks up a key's value from the cache and refreshes it.

func (*Cache) Set

func (c *Cache) Set(key string, resp []byte)

Set adds or refreshes a value in the cache.

Jump to

Keyboard shortcuts

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