add optional support for redis persistence