[Erp5-report] r39139 vincent - /erp5/trunk/products/ZSQLCatalog/SQLCatalog.py

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Oct 14 14:45:43 CEST 2010


Author: vincent
Date: Thu Oct 14 14:45:41 2010
New Revision: 39139

URL: http://svn.erp5.org?rev=39139&view=rev
Log:
Add caching for getResultColumnIds & getSortColumnIds.

Modified:
    erp5/trunk/products/ZSQLCatalog/SQLCatalog.py

Modified: erp5/trunk/products/ZSQLCatalog/SQLCatalog.py
URL: http://svn.erp5.org/erp5/trunk/products/ZSQLCatalog/SQLCatalog.py?rev=39139&r1=39138&r2=39139&view=diff
==============================================================================
--- erp5/trunk/products/ZSQLCatalog/SQLCatalog.py [utf8] (original)
+++ erp5/trunk/products/ZSQLCatalog/SQLCatalog.py [utf8] Thu Oct 14 14:45:41 2010
@@ -978,6 +978,13 @@ class Catalog(Folder,
         result.setdefault('%s.%s' % (table, field), []).append(table) # Is this inconsistent ?
     return result
 
+  @profiler_decorator
+  @transactional_cache_decorator('SQLCatalog.getColumnIds')
+  @profiler_decorator
+  @caching_instance_method(id='SQLCatalog.getColumnIds',
+    cache_factory='erp5_content_long',
+  )
+  @profiler_decorator
   def getResultColumnIds(self):
     """
     Calls the show column method and returns dictionnary of
@@ -992,6 +999,13 @@ class Catalog(Folder,
     keys.sort()
     return keys
 
+  @profiler_decorator
+  @transactional_cache_decorator('SQLCatalog.getSortColumnIds')
+  @profiler_decorator
+  @caching_instance_method(id='SQLCatalog.getSortColumnIds',
+      cache_factory='erp5_content_long',
+  )
+  @profiler_decorator
   def getSortColumnIds(self):
     """
     Calls the show column method and returns dictionnary of




More information about the Erp5-report mailing list