ristrettoc

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: May 26, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GraphCache

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

GraphCache DGraphCache cache

func NewGraphCache

func NewGraphCache(opts ...GraphCacheOption) (*GraphCache, error)

NewGraphCache new

func (*GraphCache) Clear

func (c *GraphCache) Clear()

Clear clear

func (*GraphCache) Del

func (c *GraphCache) Del(k []byte)

Del del cache via key

func (*GraphCache) Get

func (c *GraphCache) Get(k []byte) (v []byte, ck bool)

Get get

func (*GraphCache) Save

func (c *GraphCache) Save()

Save save

func (*GraphCache) Set

func (c *GraphCache) Set(k, v []byte) bool

Set set

type GraphCacheOption

type GraphCacheOption func(*ristretto.Config)

GraphCacheOption options

func WithBufferItems

func WithBufferItems(m int64) GraphCacheOption

WithBufferItems options

func WithMaxCost

func WithMaxCost(m int64) GraphCacheOption

WithMaxCost options

func WithNumCounters

func WithNumCounters(r int64) GraphCacheOption

WithNumCounters options

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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