Skip to content

Commit

Permalink
Cache buster
Browse files Browse the repository at this point in the history
  • Loading branch information
HazAT committed Feb 25, 2024
1 parent 31dd0be commit 43ad0bf
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/changelog/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {Fragment} from 'react';
import * as Sentry from '@sentry/nextjs';
import type {Metadata} from 'next';
import {revalidateTag} from 'next/cache';

import List from 'sentry-docs/components/changelog/list';

Expand All @@ -26,6 +27,11 @@ const getChangelogs = async () => {
export default async function ChangelogList() {
const changelogs = await getChangelogs();

// If we are now deployed, and changelogs are empty, clear cache
if (!process.env.CI && changelogs.length === 0) {
revalidateTag('changelogs');
}

return (
<Fragment>
<Header loading={false} />
Expand Down

0 comments on commit 43ad0bf

Please sign in to comment.