test caching booking form
This commit is contained in:
@@ -760,6 +760,13 @@ function booking_update_7250() {
|
|||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add custom cache table
|
||||||
|
*/
|
||||||
|
function booking_update_7251() {
|
||||||
|
$schema['cache_booking'] = drupal_get_schema_unprocessed('system', 'cache');
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implementation of hook_install().
|
* Implementation of hook_install().
|
||||||
*/
|
*/
|
||||||
@@ -824,6 +831,10 @@ function booking_disable() {
|
|||||||
* Implementation of hook_schema().
|
* Implementation of hook_schema().
|
||||||
*/
|
*/
|
||||||
function booking_schema() {
|
function booking_schema() {
|
||||||
|
|
||||||
|
//configure our own cache table
|
||||||
|
$schema['cache_booking'] = drupal_get_schema_unprocessed('system', 'cache');
|
||||||
|
|
||||||
$schema['booking_person'] = array(
|
$schema['booking_person'] = array(
|
||||||
'fields' => array(
|
'fields' => array(
|
||||||
//identifiers
|
//identifiers
|
||||||
|
@@ -951,6 +951,12 @@ function booking_form($node, &$form_state, $inserting = FALSE, $early_access_all
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$form['cache'] = '#cache' => array(
|
||||||
|
'cid' => 'booking_data',
|
||||||
|
'bin' => 'cache_booking',
|
||||||
|
'expire' => time() + 360,
|
||||||
|
),
|
||||||
|
|
||||||
if ($inserting == TRUE) {
|
if ($inserting == TRUE) {
|
||||||
$form['submit'] = array(
|
$form['submit'] = array(
|
||||||
'#type' => 'submit',
|
'#type' => 'submit',
|
||||||
|
Reference in New Issue
Block a user