function hansel_cache_set in Hansel breadcrumbs 7
Same name and namespace in other branches
- 8 hansel.module \hansel_cache_set()
Write data to Hansel cache, respecting Hansel cache settings.
Parameters
string $cid:
mixed $data:
4 calls to hansel_cache_set()
- hansel_action_add_link_to_user_get_crumbs in ./
hansel.actions.inc - Callback for the "add link to user" breadcrumb action to generate the crumbs.
- hansel_action_add_parents_get_crumbs in ./
hansel.actions.inc - Callback for the "add single link" breadcrumb action to generate the crumbs.
- hansel_forum_action_add_forum_path_get_crumbs in forum/
hansel_forum.module - Callback for "add forum path" breadcrumb action
- hansel_taxonomy_action_add_term_path_get_crumbs in taxonomy/
hansel_taxonomy.module - Callback for "add term path" breadcrumb action
File
- ./
hansel.module, line 788 - Hansel module
Code
function hansel_cache_set($cid, $data) {
static $setting = NULL;
if (is_null($setting)) {
$setting = variable_get('hansel_cache', 0);
}
if ($setting) {
$cid = "hansel:{$cid}";
cache_set($cid, $data, 'cache', REQUEST_TIME + $setting);
}
}