[Erp5-report] r45557 mario.amaral - /erp5/trunk/utils/cloudooo.handler.ooo/src/cloudooo/han...
nobody at svn.erp5.org
nobody at svn.erp5.org
Mon Apr 18 19:25:32 CEST 2011
Author: mario.amaral
Date: Mon Apr 18 19:25:32 2011
New Revision: 45557
URL: http://svn.erp5.org?rev=45557&view=rev
Log:
Remove cache.
Modified:
erp5/trunk/utils/cloudooo.handler.ooo/src/cloudooo/handler/ooo/granulator.py
Modified: erp5/trunk/utils/cloudooo.handler.ooo/src/cloudooo/handler/ooo/granulator.py
URL: http://svn.erp5.org/erp5/trunk/utils/cloudooo.handler.ooo/src/cloudooo/handler/ooo/granulator.py?rev=45557&r1=45556&r2=45557&view=diff
==============================================================================
--- erp5/trunk/utils/cloudooo.handler.ooo/src/cloudooo/handler/ooo/granulator.py [utf8] (original)
+++ erp5/trunk/utils/cloudooo.handler.ooo/src/cloudooo/handler/ooo/granulator.py [utf8] Mon Apr 18 19:25:32 2011
@@ -181,14 +181,11 @@ class OOGranulator(object):
#this function will be use to pick up the attibutes name and style-name
def _getFrameImageList(self):
- RELEVANT_IMAGE_CACHE = getattr(self, "RELEVANT_PARAGRAPH_CACHE", None)
- if RELEVANT_IMAGE_CACHE is None:
- relevant_image_list = self.document.parsed_content.xpath(
+ relevant_image_list = self.document.parsed_content.xpath(
IMAGE_DRAW_NAME_AND_STYLENAME_XPATH_QUERY,
namespaces=self.document.parsed_content.nsmap)
- setattr(self, "RELEVANT_IMAGE_CACHE", relevant_image_list)
- return self.RELEVANT_IMAGE_CACHE
+ return relevant_image_list
def getImageItemList(self):
"""Return a list of tuples with the id and title of image files"""
@@ -223,16 +220,11 @@ class OOGranulator(object):
return self.document.getFile(path)
def _getRelevantParagraphList(self):
- """ This should use memcache or another cache infrastructure.
- """
- RELEVANT_PARAGRAPH_CACHE = getattr(self, "RELEVANT_PARAGRAPH_CACHE", None)
- if RELEVANT_PARAGRAPH_CACHE is None:
- relevant_paragraph_list = self.document.parsed_content.xpath(
+ relevant_paragraph_list = self.document.parsed_content.xpath(
RELEVANT_PARAGRAPH_XPATH_QUERY,
namespaces=self.document.parsed_content.nsmap)
- setattr(self, "RELEVANT_PARAGRAPH_CACHE", relevant_paragraph_list)
- return self.RELEVANT_PARAGRAPH_CACHE
+ return relevant_paragraph_list
def getParagraphItemList(self):
"""Returns the list of paragraphs in the form of (id, class) where class
@@ -265,16 +257,10 @@ class OOGranulator(object):
return (text, p_class)
def _getChapterList(self):
- """ This should use memcache or another cache infrastructure.
- """
- CHAPTER_CACHE = getattr(self, "CHAPTER_CACHE", None)
- if CHAPTER_CACHE is None:
- chapter_list = self.document.parsed_content.xpath(
+ chapter_list = self.document.parsed_content.xpath(
CHAPTER_XPATH_QUERY,
namespaces=self.document.parsed_content.nsmap)
-
- setattr(self, "CHAPTER_CACHE", chapter_list)
- return self.CHAPTER_CACHE
+ return chapter_list
def getChapterItemList(self):
"""Returns the list of chapters in the form of (id, level)."""
More information about the Erp5-report
mailing list