Skip to content

Commit

Permalink
feat: disable caching on individual pages, make use of our customCache
Browse files Browse the repository at this point in the history
  • Loading branch information
masterkain committed Jul 9, 2023
1 parent 334dfee commit 2e17c20
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/bookmarks/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import SidebarDesktop from '@/components/SidebarDesktop';
import SidebarMobile from '@/components/SidebarMobile';
import type { Route } from 'next';

export const revalidate = 0;

export default async function Bookmarks({ searchParams }: { searchParams: Record<string, string> }) {
const searchQuery = searchParams.searchQuery;

Expand Down
2 changes: 2 additions & 0 deletions app/notices/[notice_id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import ProjectActionsMenu from '@/components/project/ActionsMenu';
import { getNoticeById } from '@/lib/queries/notices';
import type { Metadata, Route } from 'next';

export const revalidate = 0;

type ComponentProps = {
params: { notice_id: string };
searchParams: { [key: string]: string | undefined };
Expand Down
2 changes: 2 additions & 0 deletions app/occurrences/[occurrence_id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ import Link from 'next/link';
import { FaCarCrash } from 'react-icons/fa';
import { SlCompass, SlGlobe, SlGraph, SlLink, SlList, SlUser, SlWrench } from 'react-icons/sl';

export const revalidate = 0;

type ComponentProps = {
params: { occurrence_id: string };
searchParams: { [key: string]: string | undefined };
Expand Down
2 changes: 2 additions & 0 deletions app/projects/[project_id]/edit/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ import Link from 'next/link';
import { redirect } from 'next/navigation';
import { SlPencil, SlSettings, SlWrench } from 'react-icons/sl';

export const revalidate = 0;

type ComponentProps = {
params: { project_id: string };
searchParams: Record<string, string>;
Expand Down
2 changes: 2 additions & 0 deletions app/projects/[project_id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import type { Metadata, Route } from 'next';
import Filter from './Filter';
import Sort from './Sort';

export const revalidate = 0;

type ComponentProps = {
params: { project_id: string };
searchParams: { [key: string]: string | undefined };
Expand Down
2 changes: 2 additions & 0 deletions app/projects/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import prisma from '@/lib/db';
import type { Metadata } from 'next';
import { redirect } from 'next/navigation';

export const revalidate = 0;

export async function generateMetadata(): Promise<Metadata> {
return { title: 'Projects' };
}
Expand Down
1 change: 1 addition & 0 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const nextConfig = {
experimental: {
serverActions: true,
serverComponentsExternalPackages: ['chatgpt', '@octokit', '@airbrake/node'],
isrMemoryCacheSize: 0,
// typedRoutes: true,
},
async rewrites() {
Expand Down

0 comments on commit 2e17c20

Please sign in to comment.