cache

package
v1.7.10 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2025 License: MIT Imports: 2 Imported by: 4

Documentation

Overview

Package cache allows you to store values in the inmemory storage.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ICache

type ICache interface {
	ICacheSetter
	ICacheGetter
}

type ICacheGetter

type ICacheGetter interface {
	Get([]byte) ([]byte, bool)
}

type ICacheSetter

type ICacheSetter interface {
	Set([]byte, []byte) bool
}

type ILRUCache added in v1.6.21

type ILRUCache interface {
	ICache

	GetIndex() uint64
	GetKey(i uint64) ([]byte, bool)
}

func NewLRUCache added in v1.6.21

func NewLRUCache(pCapacity uint64) ILRUCache

Jump to

Keyboard shortcuts

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