Skip to content
Discussion options

You must be logged in to vote

Short answer: yes. A POST request is stored in the Data Cache, but only when you explicitly opt in.

The key thing to keep in mind: caching is opt-in for every request. A fetch is written to the Data Cache when all of these hold:

  • It runs server side
  • Draft Mode is not enabled (draft mode bypasses the cache and calls the real endpoint).
  • Explicit opt in to caching with cache: 'force-cache', or next: { revalidate: N } where N > 0 (or false for indefinite), or a route-level export const fetchCache / dynamic.
  • Response status is 200.

Tags only attach invalidation metadata to a request that is already cacheable (via force-cache or revalidate). A POST with only next: { tags: ['property'] } and no …

Replies: 3 comments 5 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
5 replies
@abhishekmardiya
Comment options

@icyJoseph
Comment options

@abhishekmardiya
Comment options

@icyJoseph
Comment options

@abhishekmardiya
Comment options

Answer selected by abhishekmardiya
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants