Created
April 9, 2012 10:28
-
-
Save loki42/2342765 to your computer and use it in GitHub Desktop.
beaker redis
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from beaker.middleware import CacheMiddleware, SessionMiddleware | |
def setup_redis_session(app): | |
return SessionMiddleware(app, type="redis", url="localhost:6379", key="appname") | |
application = cherrypy.Application(Root(all_available_languages), '', config='musicfilmcomedy.conf') | |
application.wsgiapp.pipeline.append(('beaker', setup_redis_session)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment