cache

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DirectoryCache

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

DirectoryCache stores serialized directory listings with TTL.

func Open

func Open(path string, ttl time.Duration) (*DirectoryCache, error)

Open initializes / opens the bbolt database file.

func (*DirectoryCache) Close

func (c *DirectoryCache) Close() error

func (*DirectoryCache) Get

func (c *DirectoryCache) Get(dir string, target any) (bool, error)

Get unmarshals cached listing into target if fresh; returns bool fresh.

func (*DirectoryCache) Put

func (c *DirectoryCache) Put(dir string, value any) error

Put writes a directory listing.

Jump to

Keyboard shortcuts

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