From 87cd384418a7354f1daa366cc21e6a5c7017877c Mon Sep 17 00:00:00 2001 From: sosukesuzuki Date: Sat, 11 Jun 2022 22:37:18 +0900 Subject: [PATCH] Update docs --- docs/cli.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/cli.md b/docs/cli.md index be5d2dba3c18..cada39ef61ae 100644 --- a/docs/cli.md +++ b/docs/cli.md @@ -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