[Erp5-report] r14754 - /erp5/trunk/products/ERP5Type/CachePlugins/SQLCache.py

nobody at svn.erp5.org nobody at svn.erp5.org
Mon Jun 11 10:16:00 CEST 2007


Author: seb
Date: Mon Jun 11 10:16:00 2007
New Revision: 14754

URL: http://svn.erp5.org?rev=14754&view=rev
Log:
we must use replace instead of insert in order to solve duplicate key problems

Modified:
    erp5/trunk/products/ERP5Type/CachePlugins/SQLCache.py

Modified: erp5/trunk/products/ERP5Type/CachePlugins/SQLCache.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/CachePlugins/SQLCache.py?rev=14754&r1=14753&r2=14754&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/CachePlugins/SQLCache.py (original)
+++ erp5/trunk/products/ERP5Type/CachePlugins/SQLCache.py Mon Jun 11 10:16:00 2007
@@ -63,7 +63,7 @@
                                          UNIQUE(cache_id, scope))
                       '''
 
-  insert_key_sql = '''INSERT INTO %s (cache_id, value, scope, stored_at, cache_duration, calculation_time) 
+  insert_key_sql = '''REPLACE INTO %s (cache_id, value, scope, stored_at, cache_duration, calculation_time) 
                               VALUES("%s", "%s", "%s", %s, %s, %s)
                     '''
                             




More information about the Erp5-report mailing list