server/sources/__init__.py
branchstable
changeset 5642 6a90357b9769
parent 5637 b72a838aa109
child 5655 ef903fff826d
child 5824 de9b7e88660e
--- a/server/sources/__init__.py	Wed Jun 02 16:25:12 2010 +0000
+++ b/server/sources/__init__.py	Wed Jun 02 17:23:42 2010 +0000
@@ -52,11 +52,11 @@
     return True
 
 class TimedCache(dict):
-    def __init__(self, ttlm, ttls=0):
-        # time to live in minutes
-        self.ttl = timedelta(seconds=ttlm*60 + ttls)
-        if self.ttl.seconds <= 0:
+    def __init__(self, ttl):
+        # time to live in seconds
+        if ttl <= 0:
             raise ValueError('TimedCache initialized with a ttl of %ss' % self.ttl.seconds)
+        self.ttl = timedelta(seconds=ttl)
 
     def __setitem__(self, key, value):
         dict.__setitem__(self, key, (datetime.now(), value))