Skip to content

Commit

Permalink
fix: caching of country profile landing
Browse files Browse the repository at this point in the history
  • Loading branch information
mlbrgl committed Feb 11, 2025
1 parent 10ff804 commit 8101e85
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions baker/siteRenderers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ const getCountryProfilePost = memoize(

// todo: we used to flush cache of this thing.
const getCountryProfileLandingPost = memoize(
async (knex: KnexReadonlyTransaction, profileSpec: CountryProfileSpec) => {
async (profileSpec: CountryProfileSpec, knex: KnexReadonlyTransaction) => {
return getFullPostBySlugFromSnapshot(knex, profileSpec.landingPageSlug)
}
)
Expand All @@ -487,7 +487,7 @@ export const renderCountryProfile = async (

const formattedCountryProfile = formatCountryProfile(formatted, country)

const landing = await getCountryProfileLandingPost(knex, profileSpec)
const landing = await getCountryProfileLandingPost(profileSpec, knex)

const overrides: PageOverrides = {
pageTitle: `${country.name}: ${profileSpec.pageTitle} Country Profile`,
Expand Down

0 comments on commit 8101e85

Please sign in to comment.