Skip to content

Instantly share code, notes, and snippets.

@rif
Created October 8, 2012 19:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rif/3854492 to your computer and use it in GitHub Desktop.
Save rif/3854492 to your computer and use it in GitHub Desktop.
web2py book redis cache fix
diff --git a/sources/29-web2py-english/13.markmin b/sources/29-web2py-english/13.markmin
index 599d8b8..8e8c01e 100644
--- a/sources/29-web2py-english/13.markmin
+++ b/sources/29-web2py-english/13.markmin
@@ -1138,8 +1138,8 @@ An alternative to Memcache is use Redis. ``Redis``:inxx
Assuming we have Redis installed and running on localhost at port 6379, we can connect to it using the following code (in a model):
-``
-from gluon.contrib.redis import RedisCache
+``
+from gluon.contrib.redis_cache import RedisCache
cache.redis = RedisCache('localhost:6379',db=None, debug=True)
``
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment