-
Notifications
You must be signed in to change notification settings - Fork 20
Next 16 support #109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Next 16 support #109
Conversation
This commit completes the comprehensive implementation of all examples from the PR fortedigital#109 checklist with full Playwright test coverage. New Examples Added: ✅ revalidate-tag - Interactive UI for testing tag revalidation ✅ revalidate-path - Interactive UI for testing path revalidation ✅ use-cache-demo - Demonstrates Next.js 16 "use cache" directive ✅ All examples have detailed explanations and code samples Comprehensive Testing: ✅ 40+ Playwright e2e tests covering all features ✅ Homepage and navigation tests ✅ Fetch cache with tag revalidation ✅ ISR with multiple dynamic routes ✅ TTL/expiration behavior ✅ Tag and path revalidation (UI + API) ✅ "use cache" directive behavior ✅ PPR partial prerendering ✅ Static params generation ✅ API route validation and error handling ✅ Cross-page navigation ✅ Performance and caching verification Documentation: ✅ README.md for examples with comprehensive guide ✅ EXAMPLES_TODO.md tracking implementation status ✅ Inline documentation in all example pages ✅ Code examples showing best practices ✅ Troubleshooting section Features Demonstrated: - Fetch caching with tags and time-based revalidation - ISR (Incremental Static Regeneration) - TTL/expiration with stale/expire ages - On-demand revalidation by tag - On-demand revalidation by path - Next.js 16 "use cache" directive - PPR (Partial Prerendering) - Static params with generateStaticParams - API routes for revalidation - Composite cache handler (Redis + LRU) All tests pass ✅ All examples functional ✅ Ready for production testing ✅
This commit adds debugging tools and testing capabilities to help diagnose and fix known cache limitations, particularly tag persistence in development mode. New Features: - Cache Debug Console (UI page + API endpoint) - Interactive cache inspection interface - Environment and cache status display - Testing instructions and Redis CLI commands - Quick links to all examples for testing - Enhanced Cache Logging - Debug logging wrapper for all cache operations - Controlled by NEXT_PRIVATE_DEBUG_CACHE environment variable - Traces GET/SET operations, tag revalidation, and strategy decisions - Comprehensive Test Suite - Added 9 new Playwright tests for cache debug console - Now 50+ total tests covering all functionality - Tests for API endpoints, UI interactions, and documentation Documentation: - TESTING_LIMITATIONS.md: Strategy for testing known issues - Tag persistence testing workflow - Development vs production comparison methodology - Redis integration testing steps - Debug logging instructions - DEVELOPMENT.md: Local development setup guide - Documents Turbopack module resolution issues with symlinked packages - Provides three workaround options - Includes debug logging instructions - Updated EXAMPLES_TODO.md to reflect completed work - Marked all core examples as complete - Documented 50+ implemented tests - Updated documentation status Technical Changes: - Updated module imports to use package exports - Changed to @fortedigital/nextjs-cache-handler/... pattern - Supports proper module resolution when published - Added cache-debug navigation link - Enhanced cache-handler.mjs with logging wrappers - Updated tsconfig.json (automatic Next.js dev types) Related to PR fortedigital#109 - addresses known limitation of tags not saving in development mode by providing debugging tools and testing infrastructure to diagnose and fix the issue.
* Reworked examples * Updated readme * F
|
Brainstorming session with AI agent in order to prepare examples. Next 15Fetch API Caching Examples
On-Demand Revalidation Examples
Route Segment Config Examples
Static Generation Examples
React Cache Function Examples
API Route Caching Examples
Next 161.
|
* Extra examples * Layout changes * Added unstable cache example
…ler) (#162) * Added revalidate profile example * Added updateTag example
* Added compatibility matrix * Readme improvements * F * F
3.0.0 aka Next 16 support
#110
Disclaimer
✅ Version 3.0.0-next16-alpha.2 is considered compatible with Next.js 16 with no breaking changes. All non-experimental features used in your Next.js 15 projects work properly in a test environment. Please be cautious with using it though, no production environment has been adapted yet and it's still in testing phase. Please report any encountered problems as issues with [Next 16] tag.
cacheComponentsIS NOT SUPPORTED WITH@fortedigital/nextjs-cache-handlerand requires adaptation not only in the package but also projects using it as some of the old APIs are unsupported whencacheComponentsis enabled.#152 for reference
Progress on stabilization
redis-minimal example project
Are old features stable?
✅ Features without experimental flag in Next 15 are considered stable in Next 16 integration with no breaking changes.
New Next 16 stable caching features + examples
profileparamrefresh() (new)- It doesn't touch the cache at all:Cache Components- Move to a new issue [Next 16]cacheComponentsand"use cache"cacheHandlers configuration and support #152 as it's a completely different cache handler setup/feature that does not overlap with existing config.Bugs