# HG changeset patch # User Thomas Waldmann # Date 1392131927 -3600 # Node ID 7e3e406f21d9dfc7a8520f4097c72c496ad32a71 # Parent fa5f81a0dfa9ab08462fbeac9b00c5ed19875a8f 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. diff -r fa5f81a0dfa9 -r 7e3e406f21d9 MoinMoin/caching.py --- 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