cache

package
v0.0.0-...-d427792 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2019 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	I = iota
	H
	C
	F
	E
)
View Source
const (
	FreeMultiples = 10
	ColdMultiples = 100
	MinCacheSize  = 2000
)
View Source
const (
	Cycle = 30
)

Variables

This section is empty.

Functions

func New

func New(limit int, d disk.Disk, log logger.Log) *cache

Types

type Cache

type Cache interface {
	Run()
	Stop()
	Flush()
	Release(Page)
	Get(int64) (Page, error)
}

type Page

type Page interface {
	Sync()
	Buffer() []byte
	PageNumber() int64
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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