Use redis_master and redis_slave to reduce the number of connections

This commit also improves the PEP8 and PEP257 quality of the file
Remove print
Do not cache the full page
Encode to utf8
Delete based in short_name. Closes #613
Merge pull request #615 from PyBossa/issue-613-cache-errors

Issue 613 cache errors