Skip to content

Comments

Using Cache Components#218

Merged
mdugue merged 2 commits intomainfrom
cache-components
Nov 21, 2025
Merged

Using Cache Components#218
mdugue merged 2 commits intomainfrom
cache-components

Conversation

@mdugue
Copy link
Owner

@mdugue mdugue commented Nov 21, 2025

  • Updated various dependencies in package.json and bun.lock, including @graphql-codegen packages and ai.
  • Added caching configuration in next.config.ts and implemented caching strategies in multiple components to improve performance.
  • Refactored locale handling in locale-switcher.tsx and updated routing logic in sitemap.ts and layout files.
  • Removed unused service worker files to streamline the project.

- Updated various dependencies in `package.json` and `bun.lock`, including `@graphql-codegen` packages and `ai`.
- Added caching configuration in `next.config.ts` and implemented caching strategies in multiple components to improve performance.
- Refactored locale handling in `locale-switcher.tsx` and updated routing logic in `sitemap.ts` and layout files.
- Removed unused service worker files to streamline the project.
@vercel
Copy link

vercel bot commented Nov 21, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
manuel-dugue Ready Ready Preview Comment Nov 21, 2025 0:47am

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

- Updated the `generateStaticParams` function in `layout.tsx` and `page.tsx` to use `flatMap` instead of `map` for improved handling of locale and sheet combinations.
Copy link

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 modernizes the caching strategy by migrating from service worker-based caching to Next.js's native "use cache" directive. The changes include dependency updates, removal of unused service worker files, and implementation of the new caching pattern across multiple components.

  • Removed service worker files (sw.js and workbox-234fc267.js) that are no longer needed
  • Updated GraphQL Codegen, Vercel Node, and AI SDK dependencies to their latest versions
  • Implemented "use cache" directive with cacheLife API in components and routes for improved performance

Reviewed Changes

Copilot reviewed 11 out of 12 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
public/workbox-234fc267.js Removed deprecated Workbox service worker implementation
public/sw.js Removed deprecated service worker configuration
package.json Updated @graphql-codegen packages (6.0.2→6.1.0, 5.1.3→5.2.0), @vercel/node (5.5.7→5.5.8), and ai (5.0.97→5.0.98)
bun.lock Updated lock file to reflect new dependency versions
next.config.ts Added cacheComponents configuration flag
app/sitemap.ts Migrated from edge runtime with revalidate to "use cache" with cacheLife("days")
app/locale-switcher.tsx Simplified from client component to server component, now routes to root locale path
app/landing-page-quote.tsx Added "use cache" directive and cacheLife("days"), removed fetch wrapper with revalidate
app/[locale]/page.tsx Removed edge runtime and revalidate exports
app/[locale]/layout.tsx Added "use cache" directive, cacheLife("hours"), and generateStaticParams function
app/[locale]/[sheet]/page.tsx Added "use cache" directive, cacheLife("hours"), and generateStaticParams function
app/[locale]/[sheet]/layout.tsx Added "use cache" directive, cacheLife("hours"), and generateStaticParams function

@mdugue mdugue merged commit 7fcdbf1 into main Nov 21, 2025
9 checks passed
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.

1 participant