Skip to content

Conversation

@Rezakarimzadeh98
Copy link

What?

I updated the example in the unstable_cache documentation to be simpler and more focused.

Why?

The previous example was a bit complex as it mixed params handling with the caching logic. It wasn't immediately clear for beginners how unstable_cache works in isolation.

How?

I replaced the example with a straightforward "Get Posts" scenario that uses mock data. This demonstrates the caching mechanism clearly without the distraction of other Next.js features.

Copilot AI review requested due to automatic review settings November 20, 2025 09:12
@ijjk ijjk added the Documentation Related to Next.js' official documentation. label Nov 20, 2025
@ijjk
Copy link
Member

ijjk commented Nov 20, 2025

Allow CI Workflow Run

  • approve CI run for commit: a6cbc69

Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR simplifies the unstable_cache documentation by replacing a complex example that involved params handling with a more straightforward "Get Posts" scenario using mock data.

  • Removed the params-based user fetching example
  • Added a simpler posts list example with mock data that clearly demonstrates the caching mechanism
  • Improved code consistency between TypeScript and JavaScript examples

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Rezakarimzadeh98
Copy link
Author

Happy to refine the example if you prefer a different structure, naming, or level of detail.
Just let me know what direction fits best with the documentation guidelines.

@Rezakarimzadeh98 Rezakarimzadeh98 force-pushed the docs/improve-unstable-cache-example branch from 03b17a6 to d10ed21 Compare November 22, 2025 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Documentation Related to Next.js' official documentation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants