filecache

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CACHE_LIFETIME   time.Duration = 15 * time.Second
	CACHE_CLEAN_TIME time.Duration = 3 * time.Second
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CachedFile

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

func NewCachedFile

func NewCachedFile(file *os.File) *CachedFile

type FileCache

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

func NewFileCache

func NewFileCache(ctx context.Context) *FileCache

func (*FileCache) Get

func (c *FileCache) Get(key string) (*os.File, bool)

Return true if file exist

func (*FileCache) GetFilesCount

func (c *FileCache) GetFilesCount() int

func (*FileCache) Push

func (c *FileCache) Push(key string, file *os.File)

Jump to

Keyboard shortcuts

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