filecache

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2026 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 CacheEntry

type CacheEntry struct {
	Fingerprint string    `json:"fingerprint"`
	Compressed  string    `json:"compressed"`
	Tokens      int       `json:"tokens"`
	HitCount    int       `json:"hit_count"`
	CreatedAt   time.Time `json:"created_at"`
	LastAccess  time.Time `json:"last_access"`
}

type FileCache

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

func NewFileCache

func NewFileCache(maxSize int) *FileCache

func (*FileCache) Clear

func (c *FileCache) Clear()

func (*FileCache) Get

func (c *FileCache) Get(content string) (string, bool)

func (*FileCache) HitRate

func (c *FileCache) HitRate() float64

func (*FileCache) Set

func (c *FileCache) Set(content, compressed string)

func (*FileCache) Size

func (c *FileCache) Size() int

func (*FileCache) Stats

func (c *FileCache) Stats() map[string]interface{}

Jump to

Keyboard shortcuts

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