You are here

function hook_session_cache_set in Session Cache API 7

Implement this set-hook to complete your own storage mechanism.

Parameters

int $storage_method: the storage method

string $bin: the name of the bin under which to store $data

mixed $data: the data to store

1 function implements hook_session_cache_set()

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_set in session_cache_file/session_cache_file.module
Implements hook_session_cache_set().
1 invocation of hook_session_cache_set()
session_cache_set in ./session_cache.module
Write data to the user session, whatever the storage mechanism may be.

File

./session_cache.api.php, line 62
API documentation for Session Cache API module.

Code

function hook_session_cache_set($storage_method, $bin, $data) {
  if ($storage_method != MYMODULE_SESSION_STORAGE) {
    return;
  }

  // Store $data in $bin, using your module's mechanism.
  // For an example see the submodule: session_cache_file.module
}