Commit 7f2a7298 authored by Boris Kocherov's avatar Boris Kocherov

for SQLCatalog caching only transactional_cache_decorator is used

caching_instance_method not used
parent f235c6b0
......@@ -80,11 +80,9 @@ def noReadOnlyTransactionCache():
yield
try:
from Products.ERP5Type.Cache import \
readOnlyTransactionCache, caching_instance_method
readOnlyTransactionCache
except ImportError:
LOG('SQLCatalog', WARNING, 'Count not import caching_instance_method, expect slowness.')
def caching_instance_method(*args, **kw):
return lambda method: method
readOnlyTransactionCache = noReadOnlyTransactionCache
try:
......@@ -1092,10 +1090,7 @@ class Catalog(Folder,
pass
return tuple(result_list)
@caching_instance_method(id='SQLCatalog.getColumnIds',
cache_factory='erp5_content_long',
cache_id_generator=generateCatalogCacheId,
)
@transactional_cache_decorator('SQLCatalog.getColumnIds')
def _getColumnIds(self):
keys = set()
add_key = keys.add
......@@ -1121,10 +1116,6 @@ class Catalog(Folder,
security.declarePrivate('getColumnMap')
@transactional_cache_decorator('SQLCatalog.getColumnMap')
@caching_instance_method(id='SQLCatalog.getColumnMap',
cache_factory='erp5_content_long',
cache_id_generator=generateCatalogCacheId,
)
def getColumnMap(self):
"""
Calls the show column method and returns dictionnary of
......@@ -1139,10 +1130,6 @@ class Catalog(Folder,
security.declarePrivate('getResultColumnIds')
@transactional_cache_decorator('SQLCatalog.getResultColumnIds')
@caching_instance_method(id='SQLCatalog.getResultColumnIds',
cache_factory='erp5_content_long',
cache_id_generator=generateCatalogCacheId,
)
def getResultColumnIds(self):
"""
Calls the show column method and returns dictionnary of
......@@ -1156,10 +1143,6 @@ class Catalog(Folder,
security.declarePrivate('getSortColumnIds')
@transactional_cache_decorator('SQLCatalog.getSortColumnIds')
@caching_instance_method(id='SQLCatalog.getSortColumnIds',
cache_factory='erp5_content_long',
cache_id_generator=generateCatalogCacheId,
)
def getSortColumnIds(self):
"""
Calls the show column method and returns dictionnary of
......@@ -2014,10 +1997,7 @@ class Catalog(Folder,
"""
return self.sql_catalog_scriptable_keys
@caching_instance_method(id='SQLCatalog.getTableIndex',
cache_factory='erp5_content_long',
cache_id_generator=generateCatalogCacheId,
)
@transactional_cache_decorator('SQLCatalog.getTableIndex')
def _getTableIndex(self, table):
table_index = {}
method = getattr(self, self.sql_catalog_index, '')
......@@ -2549,10 +2529,6 @@ class Catalog(Folder,
return kw
@transactional_cache_decorator('SQLCatalog._getSearchKeyDict')
@caching_instance_method(id='SQLCatalog._getSearchKeyDict',
cache_factory='erp5_content_long',
cache_id_generator=generateCatalogCacheId,
)
def _getSearchKeyDict(self):
result = {}
search_key_column_dict = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment