Skip to content

Commit

Permalink
Temporarily disabled caching of b1 pages
Browse files Browse the repository at this point in the history
  • Loading branch information
jzongker committed Nov 13, 2024
1 parent 0c9e88c commit 93e4de3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions src/app/[sdSlug]/[pageSlug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { PageLayout, Theme } from "@/components";
import { ApiHelper, ChurchInterface } from "@churchapps/apphelper";
import { ConfigHelper, EnvironmentHelper, GlobalStyleInterface, PageInterface } from "@/helpers";
import { ConfigurationInterface } from "@/helpers/ConfigHelper";
import { unstable_cache } from "next/cache";
import { MetaHelper } from "@/helpers/MetaHelper";
import { Metadata } from "next";
import "@/styles/animations.css";
Expand All @@ -19,8 +18,9 @@ type PageParams = Promise<{ sdSlug: string; pageSlug: string; }>

const loadSharedData = (sdSlug:string, pageSlug:string) => {
EnvironmentHelper.init();
const result = unstable_cache(loadData, ["/[sdSlug]", sdSlug], {tags:["all", "sdSlug=" + sdSlug]});
return result(sdSlug, pageSlug);
//const result = unstable_cache(loadData, ["/[sdSlug]", sdSlug], {tags:["all", "sdSlug=" + sdSlug]});
//return result(sdSlug, pageSlug);
return loadData(sdSlug, pageSlug);
}

export async function generateMetadata({params}: {params:PageParams}): Promise<Metadata> {
Expand Down
10 changes: 5 additions & 5 deletions src/app/[sdSlug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { ConfigHelper } from "@/helpers/ConfigHelper";
import { ApiHelper, ChurchInterface } from "@churchapps/apphelper/dist/helpers";
import { Theme } from "@/components/Theme";
import { PageLayout } from "@/components/PageLayout";
import { unstable_cache } from "next/cache";
import { Metadata } from "next";
import { MetaHelper } from "@/helpers/MetaHelper";
import { EnvironmentHelper } from "@/helpers/EnvironmentHelper";
Expand All @@ -14,10 +13,11 @@ import { redirect } from "next/navigation";
type PageParams = Promise<{ sdSlug: string; }>


const loadSharedData = (sdSlug:string) => {
const result = unstable_cache(loadData, ["/[sdSlug]", sdSlug], {tags:["all","sdSlug=" + sdSlug]});
return result(sdSlug);
}
const loadSharedData = (sdSlug:string) =>
//const result = unstable_cache(loadData, ["/[sdSlug]", sdSlug], {tags:["all","sdSlug=" + sdSlug]});
//return result(sdSlug);
loadData(sdSlug)


export async function generateMetadata({params}: {params:PageParams}): Promise<Metadata> {
const { sdSlug } = await params;
Expand Down

0 comments on commit 93e4de3

Please sign in to comment.