Module: check_mk
Branch: master
Commit: 5aedf26d9ddd354d8a06d6ab4a6459785f1833c6
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=5aedf26d9ddd35…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu Sep 13 15:04:26 2012 +0200
BI: common cache for all users with bi.see_all
---
web/htdocs/bi.py | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/web/htdocs/bi.py b/web/htdocs/bi.py
index 3be9a56..7daee3d 100644
--- a/web/htdocs/bi.py
+++ b/web/htdocs/bi.py
@@ -167,6 +167,11 @@ def compile_forest(user):
global g_config_information
g_config_information = new_config_information
+ # OPTIMIZE: All users that have the permissing bi.see_all
+ # can use the same cache.
+ if config.may("bi.see_all"):
+ user = '<<<see_all>>>'
+
# Try to get data from per-user cache:
cache = g_cache.get(user)
if cache: