cache

package
v0.38.9 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanupExpiredFileSystemEntries

func CleanupExpiredFileSystemEntries()

func ClearFileSystemCache

func ClearFileSystemCache()

func GetDirectoryRoot

func GetDirectoryRoot(key string, resolver func() (string, error)) (string, error)

func GetFileExists

func GetFileExists(key string, checker func() bool) bool

func GetModulePath

func GetModulePath(key string, resolver func() (string, error)) (string, error)

Types

type Entry

type Entry struct {
	Value     interface{}
	ExpiresAt time.Time
}

func (*Entry) IsExpired

func (e *Entry) IsExpired() bool

type FileSystemCache

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

func NewFileSystemCache

func NewFileSystemCache(ttl time.Duration) *FileSystemCache

func (*FileSystemCache) CleanupExpired

func (fsc *FileSystemCache) CleanupExpired()

func (*FileSystemCache) Clear

func (fsc *FileSystemCache) Clear()

func (*FileSystemCache) Delete

func (fsc *FileSystemCache) Delete(key string)

func (*FileSystemCache) Get

func (fsc *FileSystemCache) Get(key string) (interface{}, bool)

func (*FileSystemCache) Set

func (fsc *FileSystemCache) Set(key string, value interface{})

Jump to

Keyboard shortcuts

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