bigcache

package
v0.0.0-...-df0d9bb Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotImplemented = errors.New("BigCacheRepositor: method not implemented")

ErrNotImplemented means repository method not implemented

Functions

func NewExpiringRepository

func NewExpiringRepository(jsonConfig string) *cache.ExpiringCacheRepository

Types

type Config

type Config = bigcache.Config

func DefaultConfig

func DefaultConfig() Config

type Repository

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

func NewRepository

func NewRepository(jsonConfig string) *Repository

func NewRepositoryFromConfig

func NewRepositoryFromConfig(config bigcache.Config) *Repository

func (*Repository) Add

func (r *Repository) Add(key string, value []byte) error

func (*Repository) AddFor

func (r *Repository) AddFor(key string, value []byte, expiration time.Duration) error

func (*Repository) CompareAndSwap

func (r *Repository) CompareAndSwap(key string, handler func(value []byte) ([]byte, error)) error

func (*Repository) Delete

func (r *Repository) Delete(key string) error

func (*Repository) Exist

func (r *Repository) Exist(key string) bool

func (*Repository) Get

func (r *Repository) Get(key string) ([]byte, error)

func (*Repository) GetWithFlags

func (r *Repository) GetWithFlags(key string) (data []byte, flags uint32, err error)

func (*Repository) Reset

func (r *Repository) Reset()

func (*Repository) Set

func (r *Repository) Set(key string, value []byte) error

func (*Repository) SetForWithFlags

func (r *Repository) SetForWithFlags(key string, value []byte, flags uint32, ttl time.Duration) error

func (*Repository) SetWithFlags

func (r *Repository) SetWithFlags(key string, value []byte, flags uint32) error

Jump to

Keyboard shortcuts

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