cache

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContentCache

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

func NewContentCache

func NewContentCache(dir string, maxBytes int64) (*ContentCache, error)

func (*ContentCache) Get

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

func (*ContentCache) Invalidate

func (c *ContentCache) Invalidate(key string)

func (*ContentCache) Set

func (c *ContentCache) Set(key string, data []byte) error

func (*ContentCache) Size

func (c *ContentCache) Size() int64

type MetadataCache

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

func NewMetadataCache

func NewMetadataCache(ttl time.Duration) *MetadataCache

func (*MetadataCache) Close

func (c *MetadataCache) Close()

func (*MetadataCache) Get

func (c *MetadataCache) Get(key string) (any, bool)

func (*MetadataCache) Invalidate

func (c *MetadataCache) Invalidate(key string)

func (*MetadataCache) InvalidatePrefix

func (c *MetadataCache) InvalidatePrefix(prefix string)

func (*MetadataCache) Set

func (c *MetadataCache) Set(key string, data any)

Jump to

Keyboard shortcuts

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