cache

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dir

func Dir() string

Dir returns the cache directory, creating it if needed.

func Get

func Get(key string, ttl time.Duration) ([]byte, bool)

Get returns cached data if it exists and is not expired.

func Key

func Key(method, url string) string

Key generates a cache key from method + URL.

func Set

func Set(key string, data []byte)

Set writes data to the cache.

Types

This section is empty.

Jump to

Keyboard shortcuts

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