mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-03-26 17:51:54 +01:00
Remove settings cache (#2203)
This commit is contained in:
parent
13303edf29
commit
020dff52f7
@ -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">
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user