From 7d6b468c3fcfcfbf91ff41e2d230cc84540ce23e Mon Sep 17 00:00:00 2001 From: angelampcosta <92738954+angelampcosta@users.noreply.github.com> Date: Fri, 20 Sep 2024 15:09:08 +0100 Subject: [PATCH] Updates warning for cache everything (#16979) --- .../cache/how-to/cache-rules/examples/cache-everything.mdx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/content/docs/cache/how-to/cache-rules/examples/cache-everything.mdx b/src/content/docs/cache/how-to/cache-rules/examples/cache-everything.mdx index 2e4b2ffe9382c85..8b036b65a5e85e7 100644 --- a/src/content/docs/cache/how-to/cache-rules/examples/cache-everything.mdx +++ b/src/content/docs/cache/how-to/cache-rules/examples/cache-everything.mdx @@ -28,5 +28,8 @@ import { Example, Render } from "~/components" :::caution -This option caches all HTML regardless of the presence of dynamic content. If you use this approach to cache pages containing dynamic content, visitors may receive information not intended for them. To avoid caching dynamic content, you can add a condition to check for the presence of a cookie. For more information, refer to [Bypass Cache on Cookie](/cache/how-to/cache-rules/examples/bypass-cache-on-cookie/). +This option caches all HTML regardless of the presence of dynamic content. If you use this approach to cache pages containing dynamic content, visitors may receive information not intended for them. To avoid caching dynamic content, you can add a condition to the rule's matching criteria to prevent it from matching that content. Some examples include: +- Checking for the presence of a cookie. +- Negative matching against known dynamic content file paths. +- Negative matching against dynamic content extensions (or lack of an extension). :::