Commits

Gert Van Gool  committed 0ddc69b

Sometimes expiration is smaller than now, resulting in a negative cache time-out

  • Participants
  • Parent commits 51726cf

Comments (0)

Files changed (1)

File piston/utils.py

             now = time.time()
             count, expiration = cache.get(ident, (1, None))
 
-            if expiration is None:
+            if expiration is None or expiration < now:
                 expiration = now + timeout
 
             if count >= max_requests and expiration > now: