diff options
author | Dries Buytaert <dries@buytaert.net> | 2009-01-19 10:46:52 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2009-01-19 10:46:52 +0000 |
commit | d20e4571215b379676bf95898232717b121ad95b (patch) | |
tree | aa181045614138f925ccc74587a70c870e2f1ac1 /modules/system/system.admin.inc | |
parent | 8cef09a7e6c970054d44117020afc88b5ee2bd41 (diff) | |
download | brdo-d20e4571215b379676bf95898232717b121ad95b.tar.gz brdo-d20e4571215b379676bf95898232717b121ad95b.tar.bz2 |
- Patch #201122 by c960657, Moshe Weitzman: never write anonymous sessions, unless something has been written to . This is an important performance improvements -- as long as you use modules that use carefully. It might be good to report some analytics about this in the performance settings page so administrators can see if there is a 'broken' module.
Diffstat (limited to 'modules/system/system.admin.inc')
-rw-r--r-- | modules/system/system.admin.inc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/modules/system/system.admin.inc b/modules/system/system.admin.inc index 7a9a5f89e..8b1c2f0b3 100644 --- a/modules/system/system.admin.inc +++ b/modules/system/system.admin.inc @@ -1308,6 +1308,18 @@ function system_performance_settings() { $description = '<p>' . t("The normal cache mode is suitable for most sites and does not cause any side effects. The aggressive cache mode causes Drupal to skip the loading (boot) and unloading (exit) of enabled modules when serving a cached page. This results in an additional performance boost but can cause unwanted side effects.") . '</p>'; + // Check if the "Who's online" block is enabled. + $online_block_enabled = db_select('block') + ->condition('module', 'user') + ->condition('delta', 'online') + ->condition('status', 1) + ->countQuery() + ->execute() + ->fetchField(); + if ($online_block_enabled) { + $description .= '<p>' . t("When caching is enabled, anonymous user sessions are only saved to the database when needed, so the \"Who's online\" block does not display the number of anonymous users.") . '</p>'; + } + $problem_modules = array_unique(array_merge(module_implements('boot'), module_implements('exit'))); sort($problem_modules); |