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
20 changed files with 54 additions and 54 deletions

View File

@@ -137,7 +137,7 @@ export class MetadataService {
this.subscription = this.configCore.config$.subscribe(() => handlePromiseError(this.init(), this.logger));
}
const { reverseGeocoding } = await this.configCore.getConfig();
const { reverseGeocoding } = await this.configCore.getConfig({ withCache: false });
const { enabled } = reverseGeocoding;
if (!enabled) {
@@ -333,7 +333,7 @@ export class MetadataService {
private async applyReverseGeocoding(asset: AssetEntity, exifData: ExifEntityWithoutGeocodeAndTypeOrm) {
const { latitude, longitude } = exifData;
const { reverseGeocoding } = await this.configCore.getConfig();
const { reverseGeocoding } = await this.configCore.getConfig({ withCache: true });
if (!reverseGeocoding.enabled || !longitude || !latitude) {
return;
}