cache

package
v0.4.8 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExpiringReadWriter

type ExpiringReadWriter interface {
	Read(any) error
	Write(any) error
	Expired() bool
	RefreshedAt() time.Time
}

type FileCache

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

func NewFileCache

func NewFileCache(ttlInHours int, path string) *FileCache

func (*FileCache) Expired

func (c *FileCache) Expired() bool

func (*FileCache) Read

func (c *FileCache) Read(out any) error

func (*FileCache) RefreshedAt added in v0.4.6

func (c *FileCache) RefreshedAt() time.Time

func (*FileCache) Write

func (c *FileCache) Write(in any) error

Jump to

Keyboard shortcuts

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