I am calling SSRS web services to retrieve a list of reports and each report's parameters. Since SSRS doesn't have a single web service method to get that data, I need to do it in two steps. 1) Get list of reports. 2) Loop through the list of reports and for each one, call a web service method to get its parameters.
With multiple calls to get parameters, I figured I should cache the results. My question is, which is the correct/best practice way of doing it?
Should I use attributes in my controller method? But that caches the entire output of the controller, not just specific data I want to cache. (Pseudo code)
[OutputCache(Duration=3600, VaryByParam="none")]
public ActionResult GetReportList()
{
var rService = GetReportService();
var reportList = rService.ListChildren(ReportsRoot, true);
foreach (var report in reportList)
{
rService.GetParameters(report.Name);
}
return Json(result);
}
Or should I go through and manually cache only what I need using System.Web.Caching classes/method?