Module z_memo

Simple memo functions.

Copyright 2009 Marc Worrell Date: 2009-11-05

Authors: Marc Worrell (marc@worrell.nl).

Description

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

Function Index

delete/1
disable/0Disable memoization for this process, also cleans up the possible depcache memoization.
enable/0Enable memoization for this process.
get/1Check if the key is stored.
get/2
is_enabled/1Check if memoization is enabled for the current user/process.
set/2Store a key if memoization is set.
set/3
set_userid/1Set the user id for which we memo values.

Function Details

delete/1

delete(Key) -> any()

disable/0

disable() -> any()

Disable memoization for this process, also cleans up the possible depcache memoization.

enable/0

enable() -> any()

Enable memoization for this process. You need to call set_userid/1 before memoization is effective.

get/1

get(Key) -> any()

Check if the key is stored.

get/2

get(Key, Context) -> any()

is_enabled/1

is_enabled(Context) -> any()

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

set/2

set(Key, Value) -> any()

Store a key if memoization is set.

set/3

set(Key, Value, Context) -> any()

set_userid/1

set_userid(AuthUserId) -> any()

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


Generated by EDoc, Jul 22 2014, 01:04:26.