lrucache

package
v0.0.0-...-954e41a Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2015 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Overview

A standard LRU cache.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LRUCache

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

func New

func New(maxSize int) *LRUCache

func (*LRUCache) Delete

func (cache *LRUCache) Delete(key string) (val interface{}, existed bool)

func (*LRUCache) Get

func (cache *LRUCache) Get(key string) (val interface{}, ok bool)

func (*LRUCache) Len

func (cache *LRUCache) Len() int

func (*LRUCache) MaxSize

func (cache *LRUCache) MaxSize() int

func (*LRUCache) Set

func (cache *LRUCache) Set(key string, val interface{})

Jump to

Keyboard shortcuts

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