function context_cache_get in Context 6.3
Same name and namespace in other branches
- 6 context.module \context_cache_get()
- 6.2 context.module \context_cache_get()
- 7.3 context.module \context_cache_get()
Wrapper around cache_get() to make it easier for context to pull different datastores from a single cache row.
4 calls to context_cache_get()
- context_condition_map in ./
context.module - Loads an associative array of conditions => context identifiers to allow contexts to be set by different conditions.
- context_load in ./
context.module - Context loader.
- context_reaction_block::get_blocks in plugins/
context_reaction_block.inc - Helper function to generate a list of blocks from a specified region. If provided a context object, will generate a full list of blocks for that region distinguishing between system blocks and context-provided blocks.
- _context_registry in ./
context.module - Retrieves & caches the context registry.
File
- ./
context.module, line 305
Code
function context_cache_get($key, $reset = FALSE) {
static $cache;
if (!isset($cache) || $reset) {
$cache = cache_get('context', 'cache');
$cache = $cache ? $cache->data : array();
}
return !empty($cache[$key]) ? $cache[$key] : FALSE;
}