glru

package
v0.0.0-...-3e86cb5 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2022 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Package glru TODO

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 TODO LRU cache

func NEWGLRU

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

NEWGLRU TODO

func (*GLRU) Contains

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

Contains TODO

func (*GLRU) Get

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

Get TODO

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 TODO

func (*GLRU) Purge

func (lru *GLRU) Purge()

Purge TODO 清空 cache

func (*GLRU) Set

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

Set TODO

Jump to

Keyboard shortcuts

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