Fix redis cache connection leak

The redis cache wrapper does not close connections, which leads to connections being leaked.

This also applies for 0.9.1.