refactor: config caching (#10168)

This commit is contained in:
Jason Rasmussen 2024-06-12 07:07:35 -04:00 committed by GitHub
parent 5dda5d93f5
commit e84657192c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 54 additions and 54 deletions

View file

@ -42,7 +42,7 @@ export class SystemConfigService {
}
async init() {
const config = await this.core.getConfig();
const config = await this.core.getConfig({ withCache: false });
this.config$.next(config);
}
@ -51,7 +51,7 @@ export class SystemConfigService {
}
async getConfig(): Promise<SystemConfigDto> {
const config = await this.core.getConfig();
const config = await this.core.getConfig({ withCache: false });
return mapConfig(config);
}
@ -71,7 +71,7 @@ export class SystemConfigService {
throw new BadRequestException('Cannot update configuration while IMMICH_CONFIG_FILE is in use');
}
const oldConfig = await this.core.getConfig();
const oldConfig = await this.core.getConfig({ withCache: false });
try {
await this.eventRepository.serverSendAsync(ServerAsyncEvent.CONFIG_VALIDATE, {
@ -110,7 +110,7 @@ export class SystemConfigService {
}
async getCustomCss(): Promise<string> {
const { theme } = await this.core.getConfig();
const { theme } = await this.core.getConfig({ withCache: false });
return theme.customCss;
}