Skip to content

Commit c2ac282

Browse files
authored
Merge pull request #153 from kirberich/redis-backend-connection-fix
Redis backend connection fix
2 parents 6d52e4c + 9d2135b commit c2ac282

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

cachecontrol/caches/redis_cache.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from __future__ import division
22

33
from datetime import datetime
4+
from cachecontrol.cache import BaseCache
45

56

67
def total_seconds(td):
@@ -13,7 +14,7 @@ def total_seconds(td):
1314
return int((ms + secs * 10**6) / 10**6)
1415

1516

16-
class RedisCache(object):
17+
class RedisCache(BaseCache):
1718

1819
def __init__(self, conn):
1920
self.conn = conn
@@ -38,4 +39,5 @@ def clear(self):
3839
self.conn.delete(key)
3940

4041
def close(self):
41-
self.conn.disconnect()
42+
"""Redis uses connection pooling, no need to close the connection."""
43+
pass

0 commit comments

Comments
 (0)