session_cache.install in Session Cache API 6
Same filename and directory in other branches
File
session_cache.installView source
<?php
/**
* @file
* session_cache.install
*/
/**
* Implements hook_install().
*/
function session_cache_install() {
if (!db_table_exists('cache_session_cache')) {
$schema = drupal_get_schema_unprocessed('system', 'cache');
$schema['description'] = 'Cache table for Session Cache API';
db_create_table($ret, 'cache_session_cache', $schema);
}
}
/**
* Implements hook_uninstall().
*/
function session_cache_uninstall() {
// Delete session_cache_* variables at once
db_query("DELETE FROM {variable} WHERE name LIKE 'session_cache_%%'");
if (db_table_exists('cache_session_cache')) {
db_drop_table($ret, 'cache_session_cache');
}
}
Functions
Name | Description |
---|---|
session_cache_install | Implements hook_install(). |
session_cache_uninstall | Implements hook_uninstall(). |