cache

package
v0.0.0-...-db26c95 Latest Latest
Warning

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

Go to latest
Published: May 26, 2018 License: MIT Imports: 6 Imported by: 15

Documentation

Index

Constants

View Source
const (
	MaxCacheLen = 128 //number of jobs held in cache
)

Variables

View Source
var (
	ErrCacheFull = errors.New("Cache: Cache filled up")
)

Functions

This section is empty.

Types

type JobCache

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

func NewJobCache

func NewJobCache(bc *core.BlockChain) *JobCache

func NewJobCacheNoWatch

func NewJobCacheNoWatch(bc *core.BlockChain) *JobCache

creates a new jobcache without updating every minute

func (JobCache) Get

func (c JobCache) Get(key string) (*job.Job, error)

Get returns job from cache

func (JobCache) IsFull

func (c JobCache) IsFull() bool

IsFull returns true if cache is full

func (JobCache) Set

func (c JobCache) Set(key string, val []byte) error

Set adds key and value to cache

Jump to

Keyboard shortcuts

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