Advertisement
Guest User

Untitled

a guest
Dec 19th, 2014
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. [DonutOutputCache(
  2. Options = OutputCacheOptions.NoCacheLookupForPosts,
  3. Duration = 3600,
  4. Location = OutputCacheLocation.Server,
  5. VaryByParam = "calculationReference",
  6. VaryByCustom = "SurveySession(calculationReference)")]
  7.  
  8. [AuthoriseIntermediaryInSameOrganisation("calculationReference")]
  9. [HttpGet]
  10. public ActionResult Details(string calculationReference)
  11. {
  12. .....
  13.  
  14. return View(model);
  15. }
  16.  
  17. [HttpPost]
  18. public ActionResult CalculationNotes(CalculationNotesViewModel model)
  19. {
  20. if (!ModelState.IsValid)
  21. {
  22. ...
  23. }
  24.  
  25. ...
  26.  
  27. var cacheManager = new OutputCacheManager();
  28. cacheManager.RemoveItem("Calculation", "Details", new { calculationreference = model.CalculationId });
  29.  
  30. return PartialView("_CalculationNotes", model);
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement