z_memo (zotonic_core v1.0.0-rc.12)

Simple memo functions. Stores much used values in the process dictionary. Especially useful for ACL lookups.

Link to this section Summary

Functions

Disable memoization for this process, also cleans up the possible depcache memoization.
Enable memoization for this process. You need to call set_userid/1 before memoization is effective.
Check if the key is stored.
Check if memoization is enabled for the current user/process. Disabled when in a sudo action.
Store a key if memoization is set.
Set the user id for which we memo values. Called by z_auth on session initialization.

Link to this section Functions

Disable memoization for this process, also cleans up the possible depcache memoization.
Enable memoization for this process. You need to call set_userid/1 before memoization is effective.
Check if the key is stored.
Link to this function

get(Key, Context)

Link to this function

is_enabled(Context)

Check if memoization is enabled for the current user/process. Disabled when in a sudo action.
Link to this function

set(Key, Value)

Store a key if memoization is set.
Link to this function

set(Key, Value, Context)

Link to this function

set_userid(AuthUserId)

Set the user id for which we memo values. Called by z_auth on session initialization.