fix(website): caching and revalidation

This commit is contained in:
iCrawl
2023-11-11 21:05:25 +01:00
parent cf49f405b0
commit 62e6573296
4 changed files with 36 additions and 18 deletions

View File

@@ -29,6 +29,8 @@ import { OVERLOAD_SEPARATOR } from '~/util/constants';
import { fetchMember } from '~/util/fetchMember';
import { findMember } from '~/util/model';
export const revalidate = 3_600;
export interface ItemRouteParams {
item: string;
package: string;

View File

@@ -12,6 +12,8 @@ import { addPackageToModel } from '~/util/addPackageToModel';
import { PACKAGES } from '~/util/constants';
import { Providers } from './providers';
export const revalidate = 3_600;
const Header = dynamic(async () => import('~/components/Header'));
const Footer = dynamic(async () => import('~/components/Footer'));

View File

@@ -7,6 +7,8 @@ import { fetchVersions } from '~/app/docAPI';
import { buttonVariants } from '~/styles/Button';
import { PACKAGES } from '~/util/constants';
export const revalidate = 3_600;
export default async function Page({ params }: { params: { package: string } }) {
if (!PACKAGES.includes(params.package)) {
notFound();