Documentation ¶
Overview ¶
Copyright (c) 2018 Nathaniel Kofalt
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Memoizer ¶
type Memoizer struct { // Storage exposes the underlying cache of memoized results to manipulate as desired - for example, to Flush(). Storage *cache.Cache // contains filtered or unexported fields }
Memoizer allows you to memoize function calls. Memoizer is safe for concurrent use by multiple goroutines.
func NewMemoizer ¶
NewMemoizer creates a new Memoizer with the configured expiry and cleanup policies. If desired, use cache.NoExpiration to cache values forever.
Click to show internal directories.
Click to hide internal directories.