[HttpGet("measurements/lastweek")] [ProducesResponseType(typeof(Dictionary<Guid, List<List<object>>>), 200)] public async Task<Dictionary<Guid, List<List<object>>>> GetSensorMeasurementsLastWeek() { var start = DateTime.Now.AddDays(-7).Date; var s = TimeSpan.FromMinutes(15).TotalSeconds; Response.Headers.Add("Cache-Control", $"max-age={s:0}"); return await CacheHelper.CachedItem("sensor-measurements-last-week", async () => { return await DomainPorts.SensorStore.GetSensorMeasurements(start, null); }, TimeSpan.FromMinutes(15)); }
292700cookie-checkC# client-side (+server-side) cache