entitycache.install in Entity cache 7
Schema and install hooks for the entitycache module.
File
entitycache.installView source
<?php
/**
* @file
* Schema and install hooks for the entitycache module.
*/
/**
* Implements hook_schema().
*/
function entitycache_schema() {
$schema = array();
// Load the .module file rather than declare this function twice.
drupal_load('module', 'entitycache');
$entities = array_keys(entitycache_supported_core_entities());
$cache_schema = drupal_get_schema_unprocessed('system', 'cache');
foreach ($entities as $type) {
$schema["cache_entity_{$type}"] = $cache_schema;
$schema["cache_entity_{$type}"]['description'] = "Cache table used to store {$type} entity records.";
}
return $schema;
}
/**
* Implements hook_enable().
*/
function entitycache_enable() {
variable_set('entitycache_enabled', TRUE);
}
/**
* Implements hook_disable().
*/
function entitycache_disable() {
variable_del('entitycache_enabled');
}
/**
* Implements hook_uninstall().
*/
function entitycache_uninstall() {
variable_del('entitycache_disabled_entity_types');
}
/**
* Empty update.
*/
function entitycache_update_7001() {
}
/**
* Rebuild entity info cache and registry.
*/
function entitycache_update_7002() {
registry_update();
entity_info_cache_clear();
}
/**
* Rebuild entity info cache and registry.
*/
function entitycache_update_7003() {
registry_update();
entity_info_cache_clear();
}
/**
* Rebuild entity info cache and registry.
*/
function entitycache_update_7004() {
registry_update();
entity_info_cache_clear();
}
Functions
Name | Description |
---|---|
entitycache_disable | Implements hook_disable(). |
entitycache_enable | Implements hook_enable(). |
entitycache_schema | Implements hook_schema(). |
entitycache_uninstall | Implements hook_uninstall(). |
entitycache_update_7001 | Empty update. |
entitycache_update_7002 | Rebuild entity info cache and registry. |
entitycache_update_7003 | Rebuild entity info cache and registry. |
entitycache_update_7004 | Rebuild entity info cache and registry. |