options

package
v2.0.0-beta2.0...-6ef21df Latest Latest
Warning

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

Go to latest
Published: May 18, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultCacheIndexReap is the default Cache Index Reap interval (in milliseconds)
	DefaultCacheIndexReap = 3000
	// DefaultCacheIndexFlush is the default Cache Index Flush interval (in milliseconds)
	DefaultCacheIndexFlush = 5000
	// DefaultCacheMaxSizeBytes is the default Max Cache Size in Bytes
	DefaultCacheMaxSizeBytes = 536870912
	// DefaultMaxSizeBackoffBytes is the default Max Cache Backoff Size in Bytes
	DefaultMaxSizeBackoffBytes = 16777216
	// DefaultMaxSizeObjects is the default Max Cache Object Count
	DefaultMaxSizeObjects = 0
	// DefaultMaxSizeBackoffObjects is the default Max Cache Backoff Object Count
	DefaultMaxSizeBackoffObjects = 100
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	// ReapIntervalMS defines how long the Cache Index reaper sleeps between reap cycles
	ReapIntervalMS int `yaml:"reap_interval_ms,omitempty"`
	// FlushIntervalMS sets how often the Cache Index saves its metadata to the cache from application memory
	FlushIntervalMS int `yaml:"flush_interval_ms,omitempty"`
	// MaxSizeBytes indicates how large the cache can grow in bytes before the Index evicts
	// least-recently-accessed items.
	MaxSizeBytes int64 `yaml:"max_size_bytes,omitempty"`
	// MaxSizeBackoffBytes indicates how far below max_size_bytes the cache size must be
	// to complete a byte-size-based eviction exercise.
	MaxSizeBackoffBytes int64 `yaml:"max_size_backoff_bytes,omitempty"`
	// MaxSizeObjects  indicates how large the cache can grow in objects before the Index
	// evicts least-recently-accessed items.
	MaxSizeObjects int64 `yaml:"max_size_objects,omitempty"`
	// MaxSizeBackoffObjects indicates how far under max_size_objects the cache size must
	// be to complete object-size-based eviction exercise.
	MaxSizeBackoffObjects int64 `yaml:"max_size_backoff_objects,omitempty"`

	ReapInterval  time.Duration `yaml:"-"`
	FlushInterval time.Duration `yaml:"-"`
}

Options defines the operation of the Cache Indexer

func New

func New() *Options

New returns a new Cache Index Options Reference with default values set

func (*Options) Equal

func (o *Options) Equal(o2 *Options) bool

Equal returns true if all members of the subject and provided Options are identical

Jump to

Keyboard shortcuts

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