Switched to database cache backend.

I'd prefer memcached, but the python bindings don't build on python3
Added python3-memcached for memcache support.