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

Caching behaviour attached to a Liquex.Context.

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

Summary

Callbacks

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

Types

@type key() :: any()
@type value() :: any()

Callbacks

@callback 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.