cache

package
v0.13.12 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 9 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

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

Disk cache manager for fusedev.

func NewManager

func NewManager(opt Opt) (*Manager, error)

func (*Manager) CacheDir

func (m *Manager) CacheDir() string

func (*Manager) CacheUsage added in v0.3.1

func (m *Manager) CacheUsage(ctx context.Context, blobID string) (snapshots.Usage, error)

Report each blob disk usage TODO: For fscache cache files, the cache files are managed by nydusd and Linux kernel We don't know how it manages cache files. A method to address this is to query nydusd. So we can't report cache usage in the case of fscache now

func (*Manager) RemoveBlobCache added in v0.3.3

func (m *Manager) RemoveBlobCache(blobID string) error

type Opt

type Opt struct {
	Disabled bool
	CacheDir string
	Period   time.Duration
	Database *store.Database
}

Jump to

Keyboard shortcuts

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