Liquex.Cache behaviour (liquex v0.10.2) View Source

Caching behaviour attached to a Liquex.Context.

Currently, caching is only used for partial loading in render tags.

Link to this section Summary

Callbacks

Fetch a value from cache. If the value doesn't exist, run the given function and store the results within the cache.

Link to this section Types

Specs

key() :: any()

Specs

value() :: any()

Link to this section Callbacks

Specs

fetch(key(), (-> value())) :: value()

Fetch a value from cache. If the value doesn't exist, run the given function and store the results within the cache.