eviction

package
v0.0.0-...-8783e34 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EvictionStrategy

type EvictionStrategy interface {
	Get(key string) (value Value, exist bool)
	Set(key string, val Value)
	Del(key string) (success bool)
	Len() int
}

func NewLRUStrategy

func NewLRUStrategy(maxSize int64) EvictionStrategy

type Value

type Value interface {
	//size of value
	Size() int
}

Jump to

Keyboard shortcuts

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