refactor time constants and redishelper