Skip to content

Commit

Permalink
Updates warning for cache everything (#16979)
Browse files Browse the repository at this point in the history
  • Loading branch information
angelampcosta authored Sep 20, 2024
1 parent 598fbaf commit 7d6b468
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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).
:::

0 comments on commit 7d6b468

Please sign in to comment.