user and assistant, with avatars and timestamps

ML
Maya Lin

Can you compare the two caching strategies for the product feed and show me a typed example?

AI
Assistant

Here is the short plan:

  1. Cache the feed at the edge for 60 seconds.
  2. Revalidate in the background with stale-while-revalidate.
  3. Purge on publish.
Shell
curl -I https://example.com/api/feed

Want me to wire the purge hook next?

no avatar

Can you compare the two caching strategies for the product feed and show me a typed example?

Short version: cache the feed at the edge for 60 seconds and revalidate in the background. It keeps the page fast and the numbers fresh enough.

loading: shimmer line

AI
Assistant

Thinking…

loading, then streaming markdown

AI
Assistant

Thinking…

composed parts

AI
Assistant
Short version: cache the feed at the edge for 60 seconds and revalidate in the background. It keeps the page fast and the numbers fresh enough.