Commits

Gert Van Gool committed 6f1b896

Reset the count when we get a new expiration date

Comments (0)

Files changed (1)

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