diff --git a/product/ERP5/ERP5Site.py b/product/ERP5/ERP5Site.py index d52d4b0f5715bdf98c7000ae115a9caeea49f328..10bb3ca12911e5ab93fe6e62a78d1a30ec31ed37 100644 --- a/product/ERP5/ERP5Site.py +++ b/product/ERP5/ERP5Site.py @@ -398,7 +398,7 @@ class ERP5Site(FolderMixIn, CMFSite): getTypeList = CachingMethod(getTypeList, id=('_getPortalGroupedTypeList', group), - cache_duration=3600) + cache_factory='erp5_core_medium') return getTypeList(group) def _getPortalGroupedCategoryList(self, group): @@ -415,7 +415,7 @@ class ERP5Site(FolderMixIn, CMFSite): getCategoryList = CachingMethod( getCategoryList, id=('_getPortalGroupedCategoryList', group), - cache_duration=3600) + cache_factory='erp5_core_medium') return getCategoryList(group) def _getPortalGroupedStateList(self, group): @@ -433,7 +433,7 @@ class ERP5Site(FolderMixIn, CMFSite): getStateList = CachingMethod(getStateList, id=('_getPortalGroupedStateList', group), - cache_duration=3600) + cache_factory='erp5_core_medium') return getStateList(group) security.declareProtected(Permissions.AccessContentsInformation, @@ -892,7 +892,7 @@ class ERP5Site(FolderMixIn, CMFSite): if module is None: # we can't access this one continue if portal_type in self.portal_types[module.getPortalType()].allowed_content_types: - module_name = mod + module_name = mod break if module_name is not None: return module_name @@ -1076,7 +1076,7 @@ class ERP5Generator(PortalGenerator): addTool('ERP5 Order Tool', None) if not p.hasObject('portal_tests'): addTool('ERP5 Test Tool', None) - + # Add ERP5Type Tool addTool = p.manage_addProduct['ERP5Type'].manage_addTool if not p.hasObject('portal_caches'): diff --git a/product/ERP5/Tool/CategoryTool.py b/product/ERP5/Tool/CategoryTool.py index c3576ac1f6cf938dc86d841e6fd6a56fe690e94c..8ab6d8924a1c0f1319e391a8b17a7ffa6393e9e6 100644 --- a/product/ERP5/Tool/CategoryTool.py +++ b/product/ERP5/Tool/CategoryTool.py @@ -137,7 +137,7 @@ class CategoryTool(CopyContainer, CMFCategoryTool, BaseTool): """ def getBaseCategoryDict(self): return dict.fromkeys(self.getBaseCategoryList(), None) - return CachingMethod(getBaseCategoryDict, 'portal_categories.getBaseCategoryDict', cache_duration=None)(self) + return CachingMethod(getBaseCategoryDict, 'portal_categories.getBaseCategoryDict', cache_factory='erp5_core_long')(self) def updateRelatedContent(self, context, previous_category_url, new_category_url):