cache

package
v3.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Templates

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

Templates is a cache for caching and storing templates for reuse.

func New

func New() *Templates

New returns a new templates cache

func (*Templates) Has

func (t *Templates) Has(template string) (interface{}, error)

Has returns true if the cache has a template. The template is returned along with any errors if found.

func (*Templates) Store

func (t *Templates) Store(template string, data interface{}, err error)

Store stores a template with data and error

Jump to

Keyboard shortcuts

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