disk_cache

package
v0.44.0 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2025 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DiskCache

type DiskCache struct {
	Path    string
	MaxSize int64
	// contains filtered or unexported fields
}

func NewDiskCache

func NewDiskCache(path string, max_size int64) (dc *DiskCache, err error)

func (*DiskCache) Add

func (dc *DiskCache) Add(key string, items map[string][]byte) (ans map[string]string, err error)

func (*DiskCache) AddPath added in v0.44.0

func (dc *DiskCache) AddPath(path, key string, items map[string][]byte) (ans map[string]string, err error)

func (*DiskCache) Get

func (dc *DiskCache) Get(key string, items ...string) (map[string]string, error)

func (*DiskCache) GetPath added in v0.44.0

func (dc *DiskCache) GetPath(path string, items ...string) (string, map[string]string, error)

func (*DiskCache) Remove

func (dc *DiskCache) Remove(key string) (err error)

func (*DiskCache) ResultsDir added in v0.44.0

func (dc *DiskCache) ResultsDir() string

type Entry

type Entry struct {
	Key      string
	Size     int64
	LastUsed time.Time
}

func (Entry) String added in v0.44.0

func (e Entry) String() string

type Metadata

type Metadata struct {
	TotalSize     int64
	PathMap       map[string]string
	SortedEntries []*Entry
}

Jump to

Keyboard shortcuts

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