private ActionResult DateLineChartWithAverage(string title, string pointsTitle, string yAxisTitle, ICollection <Tuple <DateTime, int> > points, bool average = true) { Response.Cache.SetCacheability(HttpCacheability.Public); Response.Cache.SetMaxAge(TimeSpan.FromDays(1)); Response.Cache.SetSlidingExpiration(true); return(LowercaseJson(HighchartsHelper.DateLineChartWithAverage(title, pointsTitle, yAxisTitle, points, average))); }
private ActionResult DateLineChartWithAverage(string title, string pointsTitle, string yAxisTitle, ICollection <Tuple <DateTime, int> > points, bool average = true) { Response.GetTypedHeaders().CacheControl = new CacheControlHeaderValue { Public = true, MaxAge = TimeSpan.FromDays(1), }; // TODO: implement Response.Cache.SetSlidingExpiration(true); return(LowercaseJson(HighchartsHelper.DateLineChartWithAverage(title, pointsTitle, yAxisTitle, points, average))); }
public ActionResult Stats_EditsPerDay(int id) { var points = new ActivityEntryQueries(repository).GetEditsPerDay(id, null); return(LowercaseJson(HighchartsHelper.DateLineChartWithAverage("Edits per day", "Edits", "Number of edits", points))); }