diff MoinMoin/caching.py @ 3610:39456a5dc4e8

fix failure of detection of on-disk cache updates (this fixes unreliable dicts/groups tests), remove unused Page attribute
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sat, 17 May 2008 21:23:09 +0200
parents ea5383222f2f
children 8cb2f4ebd45f b13a58a18dac
line wrap: on
line diff
--- a/MoinMoin/caching.py	Sat May 17 19:54:30 2008 +0200
+++ b/MoinMoin/caching.py	Sat May 17 21:23:09 2008 +0200
@@ -81,11 +81,20 @@
         return os.path.exists(self._filename())
 
     def mtime(self):
+        # DEPRECATED for checking a changed on-disk cache, please use
+        # self.uid() for this, see below
         try:
             return os.path.getmtime(self._filename())
         except (IOError, OSError):
             return 0
 
+    def uid(self):
+        """ Return a value that likely changes when the on-disk cache was updated.
+
+            See docstring of MoinMoin.util.filesys.fuid for details.
+        """
+        return filesys.fuid(self._filename())
+
     def needsUpdate(self, filename, attachdir=None):
         # following code is not necessary. will trigger exception and give same result
         #if not self.exists():