diff --git a/addon/components/locale-selector-tray.hbs b/addon/components/locale-selector-tray.hbs index 37ccaa8..c2a28dc 100644 --- a/addon/components/locale-selector-tray.hbs +++ b/addon/components/locale-selector-tray.hbs @@ -16,23 +16,27 @@
- {{#each-in this.availableLocales as |key country|}} - diff --git a/addon/components/locale-selector-tray.js b/addon/components/locale-selector-tray.js index 68115b6..180de49 100644 --- a/addon/components/locale-selector-tray.js +++ b/addon/components/locale-selector-tray.js @@ -94,7 +94,11 @@ export default class LocaleSelectorTrayComponent extends Component { * @generator */ @task *loadAvailableCountries() { - this.countries = yield this.fetch.get('lookup/countries', { columns: ['name', 'cca2', 'flag', 'emoji', 'languages'] }); + this.countries = yield this.fetch.get( + 'lookup/countries', + { columns: ['name', 'cca2', 'flag', 'emoji', 'languages'] }, + { fromCache: true, expirationInterval: 1, expirationIntervalUnit: 'week' } + ); this.availableLocales = this._createAvailableLocaleMap(); }