# tf.compat.v1.summary.FileWriterCache

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v2.14.0/tensorflow/python/summary/writer/writer_cache.py#L24-L60) |

Cache for file writers.

This class caches file writers, one per directory.

## Methods

### `clear`

[View source](https://github.com/tensorflow/tensorflow/blob/v2.14.0/tensorflow/python/summary/writer/writer_cache.py#L36-L44)

    @staticmethod
    clear()

Clear cached summary writers. Currently only used for unit tests.

### `get`

[View source](https://github.com/tensorflow/tensorflow/blob/v2.14.0/tensorflow/python/summary/writer/writer_cache.py#L46-L60)

    @staticmethod
    get(
        logdir
    )

Returns the FileWriter for the specified directory.

<br />

<br />

<br />

| Args ||
|---|---|
| `logdir` | str, name of the directory. |

<br />

<br />

<br />

<br />

| Returns ||
|---|---|
| A `FileWriter`. ||

<br />