cache

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: May 20, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(relpath string) ([]byte, error)

Get returns the content of previously cached if not expired. If no error is returned and bytes is set to nil, it means that either no content was never cached or the content expired.

func Set

func Set(relpath string, content []byte, expiresIn time.Duration) error

Set stores the given content in provided cache path for the requested duration.

Types

This section is empty.

Jump to

Keyboard shortcuts

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