Documentation
¶
Index ¶
- type Cache
- func NewCache[T any](f func(string) (T, error)) (*Cache[T], error)
- func NewExprCache() (*Cache[*vm.Program], error)
- func NewLuaCache() (*Cache[*lua.FunctionProto], error)
- func NewTextTemplateCache(fm template.FuncMap) (*Cache[*template.Template], error)
- func NewTmpFileCache(root string) (*Cache[string], error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache[T any] struct { // contains filtered or unexported fields }
A LRU in-memory cache.
func NewLuaCache ¶
func NewLuaCache() (*Cache[*lua.FunctionProto], error)
func NewTextTemplateCache ¶
func NewTmpFileCache ¶
Return a new cache for temporary files to skip recreating files with the same content.
Click to show internal directories.
Click to hide internal directories.