<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def save_output_in_cache(name, filename, output):
 """Saves output in the cache location. Args: name: string: name of the linter. filename: string: path of the filename for which we are saving the output. output: string: full output (not yet filetered) of the lint command. """

    cache_filename = _get_cache_filename(name, filename)
    with _open_for_write(cache_filename) as f:
        f.write(output)