didip/beaker_extensions — pull request #22 by dairiki (2013-11-23 02:01:45+00:00)
Title: Fix redis connection pool sharing.

This fixes things so that redis connection pools are shared between `RedisManager` instances.

I'm pretty sure this was the original intent of the code. AFAICT, `RedisManager.open_connection` gets called exactly once in the normal lifecycle of a `RedisManager`. This means the currently the `collection_pools` dict always get exactly one (newly created) pool stored in it (and thus is mostly pointless.)

When using beaker sessions, a new namespace manager is created for each request, which means that currently a new connection is made to the redis server for each request. This fixes that.