cache tag
This commit is contained in:
parent
cfc3fae67c
commit
f054365a46
|
@ -119,7 +119,6 @@ export function initFactory(): Function {
|
||||||
await i18nService.init(locale);
|
await i18nService.init(locale);
|
||||||
await authService.init();
|
await authService.init();
|
||||||
const htmlEl = window.document.documentElement;
|
const htmlEl = window.document.documentElement;
|
||||||
htmlEl.classList.add('os_' + platformUtilsService.getDeviceString());
|
|
||||||
htmlEl.classList.add('locale_' + i18nService.translationLocale);
|
htmlEl.classList.add('locale_' + i18nService.translationLocale);
|
||||||
let theme = await storageService.get<string>(ConstantsService.themeKey);
|
let theme = await storageService.get<string>(ConstantsService.themeKey);
|
||||||
if (theme == null) {
|
if (theme == null) {
|
||||||
|
|
|
@ -3,7 +3,8 @@ import { I18nService as BaseI18nService } from 'jslib/services/i18n.service';
|
||||||
export class I18nService extends BaseI18nService {
|
export class I18nService extends BaseI18nService {
|
||||||
constructor(systemLanguage: string, localesDirectory: string) {
|
constructor(systemLanguage: string, localesDirectory: string) {
|
||||||
super(systemLanguage, localesDirectory, async (formattedLocale: string) => {
|
super(systemLanguage, localesDirectory, async (formattedLocale: string) => {
|
||||||
const filePath = this.localesDirectory + '/' + formattedLocale + '/messages.json';
|
const filePath = this.localesDirectory + '/' + formattedLocale + '/messages.json?cache=' +
|
||||||
|
process.env.CACHE_TAG;
|
||||||
const localesResult = await fetch(filePath);
|
const localesResult = await fetch(filePath);
|
||||||
const locales = await localesResult.json();
|
const locales = await localesResult.json();
|
||||||
return locales;
|
return locales;
|
||||||
|
|
|
@ -105,6 +105,7 @@ const plugins = [
|
||||||
'process.env': {
|
'process.env': {
|
||||||
'ENV': JSON.stringify(ENV),
|
'ENV': JSON.stringify(ENV),
|
||||||
'APPLICATION_VERSION': JSON.stringify(pjson.version),
|
'APPLICATION_VERSION': JSON.stringify(pjson.version),
|
||||||
|
'CACHE_TAG': JSON.stringify(Math.random().toString(36).substring(7)),
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
];
|
];
|
||||||
|
|
Loading…
Reference in New Issue