working version with redis integration as doc store