Some redis fixes

This pull contains some fixes for redis (first three commits).

I will remove the last commit. I just want to make you aware of the fact that the API currently supports only inclusive intervals.