changeset 6023:7e3e406f21d9

introduce a new caching scope "userdir" Needed this because none of the existing scopes is usable for caching data related to the data that is contained in the user_dir (user profiles). This is a problem for shared user_dir scenarios, when multiple wikis share the same user_dir. This is common in farm setups with single-sign-on. "farm" scope can't be used though as not all farm wikis are required to share the users. Also, non-farm setups may also have shared user_dir. Thus, best is to have this new caching scope (and even have it stored inside the user_dir directory, so it is automatically the "right" directory without needing further configuration). Having the "cache" directory inside the user_dir is no issue as the user profiles follow a specific naming pattern and we filter for that pattern.
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Tue, 11 Feb 2014 16:18:47 +0100
parents fa5f81a0dfa9
children ad461ba29a17
files MoinMoin/caching.py
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/caching.py	Tue Feb 11 15:55:54 2014 +0100
+++ b/MoinMoin/caching.py	Tue Feb 11 16:18:47 2014 +0100
@@ -32,6 +32,8 @@
         return os.path.join(request.cfg.cache_dir, request.cfg.siteid, arena)
     elif scope == 'farm':
         return os.path.join(request.cfg.cache_dir, '__common__', arena)
+    elif scope == 'userdir':
+        return os.path.join(request.cfg.user_dir, 'cache', arena)
     elif scope == 'dir':
         # arena is a specific directory, just use it
         return arena