glru

package
v0.0.0-...-98075fd Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2020 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GLRU

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

GLRU ... LRU cache

func NEWGLRU

func NEWGLRU(size int) (*GLRU, error)

NEWGLRU ...

func (*GLRU) Contains

func (lru *GLRU) Contains(key interface{}) (exist bool)

Contains ...

func (*GLRU) Get

func (lru *GLRU) Get(key interface{}) (value interface{}, ok bool)

Get ...

func (*GLRU) Keys

func (lru *GLRU) Keys() []interface{}

Keys ...

func (*GLRU) Len

func (lru *GLRU) Len() int

Len ...

func (*GLRU) Peek

func (lru *GLRU) Peek(key interface{}) (value interface{}, exist bool)

Peek ...

func (*GLRU) Purge

func (lru *GLRU) Purge()

Purge ... 清空 cache

func (*GLRU) Set

func (lru *GLRU) Set(key interface{}, value interface{}) (evicted bool)

Set ...

Jump to

Keyboard shortcuts

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