public ActionResult Index(SettingsViewModel model)
{
if (ModelState.IsValid)
{
_configReaderWriter.Save(model);
_settingsService.SaveSiteSettings(model);
_siteCache.RemoveMenuCacheItems();
// Refresh the AttachmentsDirectoryPath using the absolute attachments path, as it's calculated in the constructor
ApplicationSettings appSettings = _configReaderWriter.GetApplicationSettings();
model.FillFromApplicationSettings(appSettings);
model.UpdateSuccessful = true;
}
return View(model);
}