Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
sosukesuzuki committed Jun 11, 2022
1 parent 9d9a0f1 commit 87cd384
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion docs/cli.md
Expand Up @@ -227,7 +227,11 @@ Also, since the cache file is stored in `./node_modules/.cache/prettier/.prettie
## `--cache-strategy`

Strategy for the cache to use for detecting changed files. Can be either `metadata` or `content`. If no strategy is specified, `content` will be used.
Strategy for the cache to use for detecting changed files. Can be either `metadata` or `content`.

In general, `metadata` is faster. However, `content` is useful for updating the timestamp without changing the file content. This can happen, for example, during git operations such as `git clone`, because it does not track file modification times.

If no strategy is specified, `content` will be used.

```bash
prettier --write --cache --cache-strategy metadata src
Expand Down

0 comments on commit 87cd384

Please sign in to comment.