Update cache_number_lines when necessary