Remove settings cache (#2203)

This commit is contained in:
Chris Weaver 2024-08-21 17:55:23 -07:00 committed by GitHub
parent 13303edf29
commit 020dff52f7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 15 deletions

View File

@ -2,7 +2,7 @@ import "./globals.css";
import {
fetchEnterpriseSettingsSS,
getCombinedSettings,
fetchSettingsSS,
} from "@/components/settings/lib";
import {
CUSTOM_ANALYTICS_ENABLED,
@ -48,7 +48,7 @@ export default async function RootLayout({
}: {
children: React.ReactNode;
}) {
const combinedSettings = await getCombinedSettings({});
const combinedSettings = await fetchSettingsSS();
return (
<html lang="en">

View File

@ -50,16 +50,3 @@ export async function fetchSettingsSS() {
return combinedSettings;
}
let cachedSettings: CombinedSettings;
export async function getCombinedSettings({
forceRetrieval,
}: {
forceRetrieval?: boolean;
}): Promise<CombinedSettings> {
if (!cachedSettings || forceRetrieval) {
cachedSettings = await fetchSettingsSS();
}
return cachedSettings;
}