Skip to content

Commit f315052

Browse files
authored
Merge pull request #138 from Birne94/redis-expiration-fix
Fix key expiration for redis
2 parents c124c80 + 85ac9a5 commit f315052

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cachecontrol/caches/redis_cache.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
def total_seconds(td):
77
"""Python 2.6 compatability"""
88
if hasattr(td, 'total_seconds'):
9-
return td.total_seconds()
9+
return int(td.total_seconds())
1010

1111
ms = td.microseconds
1212
secs = (td.seconds + td.days * 24 * 3600)
13-
return (ms + secs * 10**6) / 10**6
13+
return int((ms + secs * 10**6) / 10**6)
1414

1515

1616
class RedisCache(object):

0 commit comments

Comments
 (0)