function esi_block_schema_alter in ESI: Edge Side Includes 7.3
Implements hook_schema().
2 calls to esi_block_schema_alter()
- esi_block_install in modules/
esi_block/ esi_block.install - Implements hook_install().
- esi_block_uninstall in modules/
esi_block/ esi_block.install - Implements hook_uninstall().
File
- modules/
esi_block/ esi_block.install, line 10 - Install/Uninstall/Schema hooks for ESI Block.
Code
function esi_block_schema_alter(&$schema = array()) {
// Add columns to the block schema, to record if a block should be processed
// by ESI, and its TTL.
// Adding to the schema is the most performant way to integrate, because the
// data is immediately available with no extra lookups.
$schema['block']['fields']['esi_enabled'] = array(
'type' => 'int',
'size' => 'tiny',
'not null' => FALSE,
'default' => 0,
'description' => 'Should block be served via ESI.',
);
$schema['block']['fields']['esi_ttl'] = array(
'type' => 'int',
'not null' => FALSE,
'default' => NULL,
'description' => 'Time-to-live (in seconds) for the block contents when served via ESI.',
);
return $schema;
}