Skip to content

Commit

Permalink
Prevent caching GetTaxonomy Action (#8628)
Browse files Browse the repository at this point in the history
That action is called by LocalizedTaxonomyField editor view and need to not serve cached data
  • Loading branch information
HermesSbicego-Laser committed Oct 21, 2022
1 parent e0f9879 commit 028e2e4
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public class LocalizedTaxonomyController : Controller {
_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;
Expand Down Expand Up @@ -90,4 +91,4 @@ public class LocalizedTaxonomyController : Controller {
return _taxonomyService.GetTermsForContentItem(part.ContentItem.Id, fieldName, versionOptions ?? VersionOptions.Published).Distinct(new TermPartComparer());
}
}
}
}

0 comments on commit 028e2e4

Please sign in to comment.