Ghost/ghost/custom-theme-settings-service/lib/cache.js

20 lines
368 B
JavaScript
Raw Normal View History

module.exports = class CustomThemeSettingsCache {
constructor() {
this.content = new Object();
}
get(key) {
return this.content[key].value;
}
getAll() {
return this.content;
}
populate(settings) {
settings.forEach((setting) => {
this.content[setting.key] = setting.value;
});
}
};