Commit 1c956639 authored by Vincent Pelletier's avatar Vincent Pelletier

Do not systematicaly copy cached values. It's not good in all cases (mutable...

Do not systematicaly copy cached values. It's not good in all cases (mutable subtypes, ...) so it's not a good idea and would set a bad precedent.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@25463 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent f46b61f3
...@@ -887,7 +887,7 @@ class Catalog(Folder, ...@@ -887,7 +887,7 @@ class Catalog(Folder,
keys = keys.keys() keys = keys.keys()
keys.sort() keys.sort()
return keys return keys
return CachingMethod(_getColumnIds, id='SQLCatalog.getColumnIds', cache_factory='erp5_content_long')()[:] return CachingMethod(_getColumnIds, id='SQLCatalog.getColumnIds', cache_factory='erp5_content_long')()
def getColumnMap(self): def getColumnMap(self):
""" """
...@@ -906,7 +906,7 @@ class Catalog(Folder, ...@@ -906,7 +906,7 @@ class Catalog(Folder,
if not keys.has_key(key): keys[key] = [] if not keys.has_key(key): keys[key] = []
keys[key].append(table) # Is this inconsistent ? keys[key].append(table) # Is this inconsistent ?
return keys return keys
return CachingMethod(_getColumnMap, id='SQLCatalog.getColumnMap', cache_factory='erp5_content_long')().copy() return CachingMethod(_getColumnMap, id='SQLCatalog.getColumnMap', cache_factory='erp5_content_long')()
def getResultColumnIds(self): def getResultColumnIds(self):
""" """
...@@ -1708,7 +1708,7 @@ class Catalog(Folder, ...@@ -1708,7 +1708,7 @@ class Catalog(Folder,
%(table_index, table)) %(table_index, table))
return table_index return table_index
return CachingMethod(_getTableIndex, id='SQLCatalog.getTableIndex', \ return CachingMethod(_getTableIndex, id='SQLCatalog.getTableIndex', \
cache_factory='erp5_content_long')(table=table).copy() cache_factory='erp5_content_long')(table=table)
def getIndex(self, table, column_list, all_column_list): def getIndex(self, table, column_list, all_column_list):
...@@ -1742,7 +1742,7 @@ class Catalog(Folder, ...@@ -1742,7 +1742,7 @@ class Catalog(Folder,
%(possible_index, table, column_list)) %(possible_index, table, column_list))
return possible_index return possible_index
return CachingMethod(_getIndex, id='SQLCatalog.getIndex', cache_factory='erp5_content_long')\ return CachingMethod(_getIndex, id='SQLCatalog.getIndex', cache_factory='erp5_content_long')\
(table=table, column_list=column_list, all_column_list=all_column_list)[:] (table=table, column_list=column_list, all_column_list=all_column_list)
def buildSQLQuery(self, query_table='catalog', REQUEST=None, def buildSQLQuery(self, query_table='catalog', REQUEST=None,
......
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