view @ 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 5d94d48eb350
children d811122349fb
line wrap: on
line source

#!/usr/bin/env python
    Start script for the standalone Wiki server.

    @copyright: 2007 MoinMoin:ForrestVoight
    @license: GNU GPL, see COPYING for details.

import sys, os

# a) Configuration of Python's code search path
#    If you already have set up the PYTHONPATH environment variable for the
#    stuff you see below, you don't need to do a1) and a2).

# a1) Path of the directory where the MoinMoin code package is located.
#     Needed if you installed with --prefix=PREFIX or you didn't use
#sys.path.insert(0, 'PREFIX/lib/python2.4/site-packages')

# a2) Path of the directory where / is located.
moinpath = os.path.abspath(os.path.normpath(os.path.dirname(sys.argv[0])))
sys.path.insert(0, moinpath)

# b) Configuration of moin's logging
#    If you have set up MOINLOGGINGCONF environment variable, you don't need this!
#    You also don't need this if you are happy with the builtin defaults.
#    See wiki/config/logging/... for some sample config files.
from MoinMoin import log

from MoinMoin.script import MoinScript

if __name__ == '__main__':
    sys.argv = ["", "server", "standalone"]