memorycache

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MemoryCache

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

MemoryCache an in memory cache implementation

func NewMemoryCache

func NewMemoryCache(ctx context.Context, wg *sync.WaitGroup, size int64, baseTTL uint32, forceTTL bool, gcDelay time.Duration) *MemoryCache

NewMemoryCache instantiate a new cache

func (*MemoryCache) Clear

func (c *MemoryCache) Clear()

Clear implements cache.Cache

func (*MemoryCache) Feed

func (c *MemoryCache) Feed(record dto.Record)

Feed implements cache.Cache

func (*MemoryCache) ResolveV4

func (c *MemoryCache) ResolveV4(name string) (dto.Record, error)

ResolveV4 implements cache.Cache

func (*MemoryCache) ResolveV6

func (c *MemoryCache) ResolveV6(name string) (dto.Record, error)

ResolveV6 implements cache.Cache

Jump to

Keyboard shortcuts

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