cache

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultDir

func DefaultDir() (string, error)

func Key

func Key(parts ...string) string

Types

type Cache

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

func New

func New(dir string, ttl time.Duration) *Cache

func (*Cache) Get

func (c *Cache) Get(key string) ([]byte, bool, error)

func (*Cache) Put

func (c *Cache) Put(key string, body []byte) error

type Entry

type Entry struct {
	SavedAt time.Time `json:"saved_at"`
	Body    []byte    `json:"body"`
}

Jump to

Keyboard shortcuts

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