changeset 5672:203afc609f8a

xmlrpc: Disable editor backup for putPage, renamePage and revertPage because if pages become uploaded by xmlrpc then the draft cache arena can fast increase to a big cache file size. On each of these methods called and on each server process the cache file must be loaded and processed. This can costs much memory and decreases speed of these calls.
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Mon, 24 May 2010 10:43:08 +0200
parents 172146fe48a2
children 07595b99ffb8
files MoinMoin/xmlrpc/__init__.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/xmlrpc/__init__.py	Tue May 11 23:08:11 2010 +0200
+++ b/MoinMoin/xmlrpc/__init__.py	Mon May 24 10:43:08 2010 +0200
@@ -567,7 +567,7 @@
         if not self.request.user.may.write(pagename):
             return xmlrpclib.Fault(1, "You are not allowed to edit this page")
 
-        page = PageEditor(self.request, pagename)
+        page = PageEditor(self.request, pagename, do_editor_backup=0)
         try:
             if self.version == 2:
                 newtext = self._instr(pagetext)
@@ -601,7 +601,7 @@
         # check ACLs
         if not (self.request.user.may.delete(pagename) and self.request.user.may.write(newpagename)):
             return xmlrpclib.Fault(1, "You are not allowed to rename this page")
-        editor = PageEditor(self.request, pagename)
+        editor = PageEditor(self.request, pagename, do_editor_backup=0)
 
         try:
             editor.renamePage(newpagename)
@@ -629,7 +629,7 @@
             return xmlrpclib.Fault(1, "You are not allowed to edit this page")
 
         rev = int(self._instr(revision))
-        editor = PageEditor(self.request, pagename)
+        editor = PageEditor(self.request, pagename, do_editor_backup=0)
 
         try:
             editor.revertPage(rev)