Back to godoc.org

Package cache

v3.3.22+incompatible
Latest Go to latest

The latest major version is .

Published: May 20, 2020 | License: Apache-2.0 | Module: go.etcd.io/etcd

Overview

Package cache exports functionality for efficiently caching and mapping `RangeRequest`s to corresponding `RangeResponse`s.

Index

Variables

var (
	DefaultMaxEntries = 2048
	ErrCompacted      = rpctypes.ErrGRPCCompacted
)

type Cache

type Cache interface {
	Add(req *pb.RangeRequest, resp *pb.RangeResponse)
	Get(req *pb.RangeRequest) (*pb.RangeResponse, error)
	Compact(revision int64)
	Invalidate(key []byte, endkey []byte)
	Size() int
	Close()
}

func NewCache

func NewCache(maxCacheEntries int) Cache

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier