diff options
author | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-08-25 09:25:49 +0000 |
---|---|---|
committer | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-08-25 09:25:49 +0000 |
commit | 801756e7e69cfc8a22d8c1c612a31391872c35bc (patch) | |
tree | 3d70f6ee8d720628bf87039193a4fac07a1e6613 /modules/system | |
parent | 92914245608123f9e011d1e9d4cf8c057bc9e8a8 (diff) | |
download | brdo-801756e7e69cfc8a22d8c1c612a31391872c35bc.tar.gz brdo-801756e7e69cfc8a22d8c1c612a31391872c35bc.tar.bz2 |
#111127 by chx: cache node_load(), so heavy operations loading data from external sources and only invoked once (note that you should do everything dynamic in the view op, not the load op)
Diffstat (limited to 'modules/system')
-rw-r--r-- | modules/system/system.install | 24 | ||||
-rw-r--r-- | modules/system/system.module | 1 |
2 files changed, 25 insertions, 0 deletions
diff --git a/modules/system/system.install b/modules/system/system.install index ca4412853..b07441ec9 100644 --- a/modules/system/system.install +++ b/modules/system/system.install @@ -3527,6 +3527,30 @@ function system_update_6027() { } /** + * Add the node load cache table. + */ +function system_update_6028() { + $ret = array(); + + // Create the cache_node table. + $schema['cache_node'] = array( + 'fields' => array( + 'cid' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), + 'data' => array('type' => 'blob', 'not null' => FALSE, 'size' => 'big'), + 'expire' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), + 'created' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), + 'headers' => array('type' => 'text', 'not null' => FALSE), + 'serialized' => array('type' => 'int', 'size' => 'small', 'not null' => TRUE, 'default' => 0) + ), + 'indexes' => array('expire' => array('expire')), + 'primary key' => array('cid'), + ); + db_create_table($ret, 'cache_node', $schema['cache_node']); + + return $ret; +} + +/** * @} End of "defgroup updates-5.x-to-6.x" * The next series of updates should start at 7000. */ diff --git a/modules/system/system.module b/modules/system/system.module index 7771a8536..87395ad88 100644 --- a/modules/system/system.module +++ b/modules/system/system.module @@ -1868,6 +1868,7 @@ function system_modules_submit($form, &$form_state) { node_types_rebuild(); menu_rebuild(); cache_clear_all('schema', 'cache'); + cache_clear_all('*', 'cache_node', TRUE); drupal_set_message(t('The configuration options have been saved.')); } |