add redis cache and fix one bug