function blockcache_alter_rehash in Block Cache Alter 6
Blockcache alter rehash function.
This function is called during the block list administration screen and during hook_flush_caches() so the cache settings are updated.
2 calls to blockcache_alter_rehash()
- blockcache_alter_flush_caches in ./
blockcache_alter.module - Implementation of hook_flush_caches().
- blockcache_alter_form_alter in ./
blockcache_alter.module - Implementation of hook_form_alter().
File
- ./
blockcache_alter.module, line 28 - Block Cache alter.
Code
function blockcache_alter_rehash() {
$caches = db_query('SELECT * FROM {blockcache_alter}');
while ($block = db_fetch_object($caches)) {
db_query("UPDATE {blocks} SET cache = %d WHERE module = '%s' AND delta = '%s'", $block->cache, $block->module, $block->delta);
}
}