Skip to content
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

fix(core): rename DEFAULT_REVALIDATE_TARGET env variable #1317

Merged
merged 1 commit into from
Aug 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/proud-colts-relate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@bigcommerce/catalyst-core": patch
---

Rename NEXT_PUBLIC_DEFAULT_REVALIDATE_TARGET to DEFAULT_REVALIDATE_TARGET since we don't need this exposed to the client.
2 changes: 1 addition & 1 deletion core/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ TURBO_REMOTE_CACHE_SIGNATURE_KEY=
# The time persisted is not defined
# https://nextjs.org/docs/app/building-your-application/caching#data-cache
# This sets a sensible revalidation target for cached requests
NEXT_PUBLIC_DEFAULT_REVALIDATE_TARGET=3600
DEFAULT_REVALIDATE_TARGET=3600
4 changes: 2 additions & 2 deletions core/client/revalidate-target.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export const revalidate = process.env.NEXT_PUBLIC_DEFAULT_REVALIDATE_TARGET
? Number(process.env.NEXT_PUBLIC_DEFAULT_REVALIDATE_TARGET)
export const revalidate = process.env.DEFAULT_REVALIDATE_TARGET
? Number(process.env.DEFAULT_REVALIDATE_TARGET)
: 3600;
Loading