Added unit tests for redis cache driver and made resulting fixes