# # # patch "README" # from [c7890d01c86e28a104451197d2638113f7d6c9c6] # to [cb698a1ab982cb7b97b3797274da7f16d9369302] # # patch "tracmtn/cache.py" # from [8b1a72f64749b55a4c7cc4fffbe908884a78da1f] # to [60008b6fff8d57312b658b56585f9c81c2763512] # ============================================================ --- README c7890d01c86e28a104451197d2638113f7d6c9c6 +++ README cb698a1ab982cb7b97b3797274da7f16d9369302 @@ -67,15 +67,16 @@ cachespec = backend[:option1[:option2[...]]] Currently these backends are provided: - - 'localmem': (default) uses local memory for caching. Takes no - options. + - 'localmem[:prefix]': (default) uses local memory for caching. + Takes an optional 'prefix' argument that can be chosen freely + and is used to keep caches for different repositories separated. - 'dbmshelve:prefix': Persistent, uses Unix DBM databases named - prefix*.{pag|dir}. All directories in prefix must exist. Not suited - for concurrent access by more than one process. + prefix*.{pag|dir}. All directories in prefix must exist. Not + suited for concurrent access by more than one process. - 'bsddb:dir:prefix': Uses the bsddb3 binding to a persistent - BerkeleyDB database. The directory 'dir' must be writable by - trac. The 'prefix' is the common part of all cache files in - this directory and can be chosen freely. + BerkeleyDB database. The directory 'dir' must be writable by + trac. The 'prefix' is the common part of all cache files in this + directory and can be chosen freely. * The 'xtracerts' option can be used to specify a (coma-separated) list of user-defined certs to be displayed as changeset ============================================================ --- tracmtn/cache.py 8b1a72f64749b55a4c7cc4fffbe908884a78da1f +++ tracmtn/cache.py 60008b6fff8d57312b658b56585f9c81c2763512 @@ -41,7 +41,7 @@ class LocalMem(object): caches = {} - def __init__(self, realm, prefix): + def __init__(self, realm, prefix=''): name = prefix + realm self.cache = self.caches.setdefault(name, {})