protected void ItemDo(ConfigurationItem item) { switch (item.Name) { case "Global:ReadOnlyMode": categoriesCache.Initialize(); return; } }
public IActionResult ResetAllCache() { componentsCache.Initialize(); categoriesCache.Initialize(); menuCache.Initialize(); rolesCache.Initialize(); contentCache.Reset(); spamProtectionCache.Reset(); mailTemplatesCache.Initialize(); dynamicConfigCache.Initialize(); configurationRoot.Reload(); return(Ok()); }
public async ValueTask <IActionResult> CreateCategory([FromBody] CategoryRequestModel categoryData) { if (!ModelState.IsValid) { return(ValidationProblem()); } var category = categoryData.ToCategory(); await categoriesAdminManager.CreateCategoryAsync(category); categoriesCache.Initialize(); contentCache.Reset(); return(Ok()); }