comparison MoinMoin/_tests/__init__.py @ 6025:05a6897ee496

"userdir" caching scope: use it for userid lookup caches, reduce code duplication For same reasons (see previous changesets), we need to use the "userdir" scope for the name2id / openid2id lookup caches, too.
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Wed, 12 Feb 2014 12:07:22 +0100
parents 2aa43685e17b
children 1893da1d5213
comparison
equal deleted inserted replaced
6024:ad461ba29a17 6025:05a6897ee496
58 user_dir = request.cfg.user_dir 58 user_dir = request.cfg.user_dir
59 user_id = user.getUserId(request, username) 59 user_id = user.getUserId(request, username)
60 # really get rid of the user 60 # really get rid of the user
61 fpath = os.path.join(user_dir, user_id) 61 fpath = os.path.join(user_dir, user_id)
62 os.remove(fpath) 62 os.remove(fpath)
63 # delete cache 63 user.clearUserIdLookupCaches(request)
64 arena = 'user'
65 key = 'name2id'
66 caching.CacheEntry(request, arena, key, scope='wiki').remove()
67 64
68 # Creating and destroying test pages -------------------------------- 65 # Creating and destroying test pages --------------------------------
69 66
70 def create_page(request, pagename, content, do_editor_backup=False): 67 def create_page(request, pagename, content, do_editor_backup=False):
71 """ create a page with some content """ 68 """ create a page with some content """