Sort redis commands