You are here

session_cache.install in Session Cache API 6

Same filename and directory in other branches
  1. 8 session_cache.install
  2. 7 session_cache.install

File

session_cache.install
View 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