iocache

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2017 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IOCache

type IOCache struct {
	// contains filtered or unexported fields
}

IOCache is a read-through cache to:

a) provide a reentrant interface b) deduplicate page pread(2) requests (i.e. no thundering-herd for the same

page file)

c) prevent tainting of the filesystem cache (i.e. ZFS ARC) by artificially

promoting pages from the MRU to the MFU.

d) sized sufficiently large so that we can spend our time faulting in pages

vs performing cache hits.

func New

New creates a new IOCache.

func (*IOCache) GetIFPresent

func (ioc *IOCache) GetIFPresent(k interface{}) (interface{}, error)

GetIFPresent forwards to gcache.Cache's GetIFPresent().

func (*IOCache) Purge

func (ioc *IOCache) Purge()

Purge purges the IOCache of its cache (and all downstream caches)

func (*IOCache) Wait added in v0.1.1

func (ioc *IOCache) Wait()

Wait blocks until the IOCache finishes shutting down its workers.

Jump to

Keyboard shortcuts

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