Back to index

moin  1.9.0~rc2
refresh.py
Go to the documentation of this file.
00001 # -*- coding: iso-8859-1 -*-
00002 """
00003     MoinMoin - refresh cache of a page
00004 
00005     @copyright: 2000-2004 Juergen Hermann <jh@web.de>,
00006                 2006 MoinMoin:ThomasWaldmann
00007     @license: GNU GPL, see COPYING for details.
00008 """
00009 from MoinMoin.Page import Page
00010 
00011 def execute(pagename, request):
00012     """ Handle refresh action """
00013     # Without arguments, refresh action will refresh the page text_html cache.
00014     arena = request.values.get('arena', 'Page.py')
00015     if arena == 'Page.py':
00016         arena = Page(request, pagename)
00017     key = request.values.get('key', 'text_html')
00018 
00019     # Remove cache entry (if exists), and send the page
00020     from MoinMoin import caching
00021     caching.CacheEntry(request, arena, key, scope='item').remove()
00022     caching.CacheEntry(request, arena, "pagelinks", scope='item').remove()
00023     request.page.send_page()
00024