Skip to content

Commit 3a2b913

Browse files
committed
Add extra install target for redis
1 parent a561ac9 commit 3a2b913

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

docs/storage.rst

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,14 @@ RedisCache
6969

7070
The `RedisCache` uses a Redis database to store values. The values are
7171
stored as strings in redis, which means the get, set and delete
72-
actions are used.
72+
actions are used. It requires the `redis`_ library to be installed.
73+
74+
.. note::
75+
76+
Note that you can install this dependency automatically with pip
77+
by requesting the *redis* extra: ::
78+
79+
pip install cachecontrol[redis]
7380

7481
The `RedisCache` also provides a clear method to delete all keys in a
7582
database. Obviously, this should be used with caution as it is naive
@@ -94,3 +101,4 @@ a better method for utilizing redis as a cache.
94101
.. _httplib2: http://code.google.com/p/httplib2/
95102
.. _lockfile: https://github.com/smontanaro/pylockfile
96103
.. _requests 2.1: http://docs.python-requests.org/en/latest/community/updates/#id2
104+
.. _redis: https://github.com/andymccurdy/redis-py

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
],
2323
extras_require={
2424
'filecache': ['lockfile>=0.9'],
25+
'redis': ['redis>=2.10.5'],
2526
},
2627
entry_points={
2728
'console_scripts': [

0 commit comments

Comments
 (0)