Back to index

moin  1.9.0~rc2
Classes | Functions | Variables
MoinMoin.caching Namespace Reference

Classes

class  CacheError
class  CacheEntry

Functions

def get_arena_dir
def get_cache_list

Variables

tuple logging = log.getLogger(__name__)

Class Documentation

class MoinMoin::caching::CacheError
raised if we have trouble locking, reading or writing 

Definition at line 22 of file caching.py.


Function Documentation

def MoinMoin.caching.get_arena_dir (   request,
  arena,
  scope 
)

Definition at line 27 of file caching.py.

00027 
00028 def get_arena_dir(request, arena, scope):
00029     if scope == 'item': # arena is a Page instance
00030         # we could move cache out of the page directory and store it to cache_dir
00031         return arena.getPagePath('cache', check_create=1)
00032     elif scope == 'wiki':
00033         return os.path.join(request.cfg.cache_dir, request.cfg.siteid, arena)
00034     elif scope == 'farm':
00035         return os.path.join(request.cfg.cache_dir, '__common__', arena)
00036     elif scope == 'dir':
00037         # arena is a specific directory, just use it
00038         return arena
00039     return None
00040 

Here is the caller graph for this function:

def MoinMoin.caching.get_cache_list (   request,
  arena,
  scope 
)

Definition at line 41 of file caching.py.

00041 
00042 def get_cache_list(request, arena, scope):
00043     arena_dir = get_arena_dir(request, arena, scope)
00044     try:
00045         return filesys.dclistdir(arena_dir)
00046     except OSError:
00047         return []
00048 

Here is the call graph for this function:


Variable Documentation

Definition at line 16 of file caching.py.