redis usage and code analysis