Prevent caching GetTaxonomy Action

That action is called by LocalizedTaxonomyField editor view and need to not serve cached data
This commit is contained in:
Hermes Sbicego
2022-10-07 17:30:33 +02:00
committed by GitHub
parent e0f987951e
commit cb039611b8

View File

@@ -34,6 +34,7 @@ namespace Orchard.Taxonomies.Controllers {
_localizationService = localizationService;
}
[OutputCache(NoStore = true, Duration = 0)]
public ActionResult GetTaxonomy(string contentTypeName, string taxonomyFieldName, int contentId, string culture) {
var viewModel = new TaxonomyFieldViewModel();
bool autocomplete = false;
@@ -90,4 +91,4 @@ namespace Orchard.Taxonomies.Controllers {
return _taxonomyService.GetTermsForContentItem(part.ContentItem.Id, fieldName, versionOptions ?? VersionOptions.Published).Distinct(new TermPartComparer());
}
}
}
}