cachetest

package
v0.0.0-...-8f24c92 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunCustomCache

func RunCustomCache(numberOfKeysI int, opsPerWorkerI int, allowedCacheSizeMBI int)

func RunCustomFastCache

func RunCustomFastCache(numberOfKeysI int, opsPerWorkerI int, allowedCacheSizeMBI int)

func RunFreeCache

func RunFreeCache(numberOfKeysI int, opsPerWorkerI int, allowedCacheSizeMBI int)

func RunGoCache

func RunGoCache(numberOfKeysI int, opsPerWorkerI int, allowedCacheSizeMBI int)

func RunRistretto

func RunRistretto(numberOfKeysI int, opsPerWorkerI int, allowedCacheSizeMBI int)

Types

type CustomCache

type CustomCache struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

This is my very simple cache. I was surprised how well it works.

func NewCustomSimpleCache

func NewCustomSimpleCache(maxsizeMB int) *CustomCache

func (*CustomCache) Del

func (c *CustomCache) Del(key string) bool

func (*CustomCache) Get

func (c *CustomCache) Get(key string) ([]byte, bool)

func (*CustomCache) Set

func (c *CustomCache) Set(key string, value []byte)

type CustomFastCache

type CustomFastCache struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

This is my very simple cache. I was surprised how well it works.

func NewCustomFastCache

func NewCustomFastCache(maxsizeMB int) *CustomFastCache

func (*CustomFastCache) Del

func (c *CustomFastCache) Del(key string) bool

func (*CustomFastCache) Get

func (c *CustomFastCache) Get(key string) ([]byte, bool)

func (*CustomFastCache) Set

func (c *CustomFastCache) Set(key string, value []byte)

Jump to

Keyboard shortcuts

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