cacher

package
v0.0.60 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2021 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 Const

type Const struct {
	sync.Once
	// contains filtered or unexported fields
}

Const defines a constant cacher which is lazy-loaded.

func NewConst

func NewConst(load func() interface{}) *Const

NewConst returns a const cacher.

func (*Const) Clear

func (c *Const) Clear()

Clear clears the cached value pointer.

func (*Const) Get

func (c *Const) Get() interface{}

Get returns the cached value pointer.

func (*Const) IsLoaded

func (c *Const) IsLoaded() bool

IsLoaded returns if the const is loaded.

Jump to

Keyboard shortcuts

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