function hook_session_cache_get in Session Cache API 7
Implement this get-hook to complete your own storage mechanism.
Parameters
int $storage_method: the storage methd
string $bin: the name of the bin to retrieve cached data from
Return value
mixed the cached data
1 function implements hook_session_cache_get()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- session_cache_file_session_cache_get in session_cache_file/
session_cache_file.module - Implements hook_session_cache_get().
1 invocation of hook_session_cache_get()
- session_cache_get in ./
session_cache.module - Read data from the user session, given its bin id.
File
- ./
session_cache.api.php, line 81 - API documentation for Session Cache API module.
Code
function hook_session_cache_get($storage_method, $bin) {
if ($storage_method != MYMODULE_SESSION_STORAGE) {
return NULL;
}
// ... your retrieval mechanism goes here.
$data = "your data based on {$bin}";
return $data;
}