add line protocol helper to make it reusable
simplify and reusify the cached value usage