cache

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 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, error)
}

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, error)

func (*FileCache) Read

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

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