function performance_caching_message in Performance Logging and Monitoring 7.2
Same name and namespace in other branches
- 6.2 performance.module \performance_caching_message()
- 6 performance.module \performance_caching_message()
- 7 performance.module \performance_caching_message()
Display message on settings form.
1 call to performance_caching_message()
- performance_settings_form in ./
performance.module - System settings form.
File
- ./
performance.module, line 218 - Logs detailed and/or summary page generation time and memory consumption for page requests. Copyright Khalid Baheyeldin 2008 of http://2bits.com
Code
function performance_caching_message() {
$default = 'DrupalDatabaseCache';
$type = 'error';
$cache = variable_get(PERFORMANCE_CACHE, $default);
if ($cache != $default) {
$message = t('Alternative caching (%class) is enabled. It is reasonably safe to enable summary logging on live sites.', array(
'%class' => $cache,
));
$type = 'status';
}
else {
$message = t('Only the default database caching mechanism is enabled. It is <strong>not</strong> safe to enable summary logging to the database on live sites!');
}
drupal_set_message($message, $type, FALSE);
return $type;
}