fastc

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: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type VictoriaCache

type VictoriaCache struct {
	TTL time.Duration
	// contains filtered or unexported fields
}

VictoriaCache fast cache from fast http

func NewVictoriaCache

func NewVictoriaCache(opts ...VictoriaCacheOption) *VictoriaCache

NewVictoriaCache fast cache

func (*VictoriaCache) Clear

func (c *VictoriaCache) Clear()

Clear clear

func (*VictoriaCache) Del

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

Del delete

func (*VictoriaCache) Get

func (c *VictoriaCache) Get(k []byte) (v []byte, check bool)

Get get

func (*VictoriaCache) Save

func (c *VictoriaCache) Save()

Save save

func (*VictoriaCache) Set

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

Set set

type VictoriaCacheOption

type VictoriaCacheOption func(*VictoriaCache)

VictoriaCacheOption options

func WithCacheSize

func WithCacheSize(r int) VictoriaCacheOption

WithCacheSize set cache size

func WithPath

func WithPath(p string) VictoriaCacheOption

WithPath set cache file path

func WithTTL

WithTTL set cache size

func WithTimeOut

func WithTimeOut(r time.Duration) VictoriaCacheOption

WithTimeOut set time out

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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