[Checkins] SVN: relstorage/trunk/relstorage/storage.py Added a method for clearing memcache, to avoid confusing

Shane Hathaway shane at hathawaymix.org
Wed Oct 14 04:54:58 EDT 2009


Log message for revision 105061:
  Added a method for clearing memcache, to avoid confusing
  test results.
  

Changed:
  U   relstorage/trunk/relstorage/storage.py

-=-
Modified: relstorage/trunk/relstorage/storage.py
===================================================================
--- relstorage/trunk/relstorage/storage.py	2009-10-14 08:54:25 UTC (rev 105060)
+++ relstorage/trunk/relstorage/storage.py	2009-10-14 08:54:58 UTC (rev 105061)
@@ -274,6 +274,13 @@
         if cache is not None:
             cache.flush_all()
 
+    def clear_cache(self):
+        """Clear all data from memcached.  Used by speed tests.
+        """
+        cache = self._cache
+        if cache is not None:
+            cache.flush_all()
+
     def release(self):
         """Release back end database sessions used by this storage instance.
         """



More information about the checkins mailing list