From ad378aa7ab7ddc586efcd50486ee18f30b2d2fb9 Mon Sep 17 00:00:00 2001 From: mscherer Date: Thu, 29 Jan 2026 08:45:33 +0100 Subject: [PATCH] Fix counter_cache command argument order in examples The model argument (Comments) should come as the positional argument since it's the table with the CounterCache behavior, and the association (Articles) should be the --assoc option value. Closes #8195 --- docs/en/console-commands/counter-cache.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/en/console-commands/counter-cache.md b/docs/en/console-commands/counter-cache.md index ad3eab7f80..d94557d0de 100644 --- a/docs/en/console-commands/counter-cache.md +++ b/docs/en/console-commands/counter-cache.md @@ -6,7 +6,7 @@ recovery operations, or to populate new counter caches added to your application. ``` bash -bin/cake counter_cache --assoc Comments Articles +bin/cake counter_cache Comments --assoc Articles ``` This would rebuild the `Comments` related counters on the `Articles` table. @@ -14,7 +14,7 @@ For very large tables you may need to rebuild counters in batches. You can use the `--limit` and `--page` options to incrementally rebuild counter state. ``` bash -bin/cake counter_cache --assoc Comments --limit 100 --page 2 Articles +bin/cake counter_cache Comments --assoc Articles --limit 100 --page 2 ``` When `limit` and `page` are used, records will be ordered by the table's