Skip to content

Conversation

@AyronK
Copy link
Collaborator

@AyronK AyronK commented Oct 15, 2025

3.0.0 aka Next 16 support

#110

Disclaimer

THIS IS VERY EARLY ATTEMPT TO MAKE THE INTEGRATION WORK WITH NEXT 16

Don't expect this package to be ready sooner than 1-2 months after 16.0.0 get officially released and knowing how much issues and undocumented changes Next 15 had it's not recommended to upgrade to 16.0.0 too soon if your setup contains a Redis cache handler. Be cautious!

Progress on stabilization

redis-minimal example project

are old features stable?

  • Migrating to next 16
  • Verify instrumentation
  • Verifying fetch-example
  • Verifying isr-example
  • Veryfing static-params-test
  • Veryfing tags
  • Verifying ttl
  • Verifying on demand revalidation
  • Improve example for tag on demand revalidation
  • Add example for full page on demand revalidation
  • Add example for full layout on demand revalidation
  • Add missing examples (to be decided what's missing)
  • Improve example project, add examples menu and a shared layout
  • Add examples README/docs

experimental features revisit

  • Adjusting/verifying ppr-example

New Next 16 stable caching features

Progress on known issues

  • Tags are not saved properly (on dev run only; works well when built)
    Example: fetch-example, futurama tag from fetch is not saved in redis entry or __sharedTags__

Additional scope (optional)

experimental features

@AyronK AyronK self-assigned this Oct 15, 2025
mrjasonroy pushed a commit to mrjasonroy/nextjs-cache-handler that referenced this pull request Nov 8, 2025
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 ✅
mrjasonroy pushed a commit to mrjasonroy/nextjs-cache-handler that referenced this pull request Nov 9, 2025
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants