mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
refactor: config caching (#10168)
This commit is contained in:
parent
5dda5d93f5
commit
e84657192c
20 changed files with 54 additions and 54 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue