commit-gnue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

r5680 - trunk/gnue-appserver/src


From: reinhard
Subject: r5680 - trunk/gnue-appserver/src
Date: Thu, 8 Apr 2004 13:05:37 -0500 (CDT)

Author: reinhard
Date: 2004-04-08 13:05:36 -0500 (Thu, 08 Apr 2004)
New Revision: 5680

Modified:
   trunk/gnue-appserver/src/data.py
Log:
Properly clear cache on rollback. This fixes changes from other sessions not
being visible after new query.


Modified: trunk/gnue-appserver/src/data.py
===================================================================
--- trunk/gnue-appserver/src/data.py    2004-04-08 16:19:56 UTC (rev 5679)
+++ trunk/gnue-appserver/src/data.py    2004-04-08 18:05:36 UTC (rev 5680)
@@ -214,17 +214,6 @@
     return self.__new
 
   # ---------------------------------------------------------------------------
-  # Discard all dirty data from the cache - i.e. undo all writes with dirty = 1
-  # ---------------------------------------------------------------------------
-
-  def undo (self):
-    """
-    Revert all data in the cache to the remembered original value.
-    """
-
-    self.__new = {}
-
-  # ---------------------------------------------------------------------------
   # Clear the whole cache
   # ---------------------------------------------------------------------------
 
@@ -510,8 +499,9 @@
     # too.
     self.__connections.rollbackAll ()
 
-    # Clean up the cache
-    self.__cache.undo ()
+    # The transaction has ended. Changes from other transactions could become
+    # valid in this moment, so we have to clear the whole cache.
+    self.__cache.clear ()
 
   # ---------------------------------------------------------------------------
   # Close the connection





reply via email to

[Prev in Thread] Current Thread [Next in Thread]