From 583edc9de4448234405ee4cf8f04a0fa66652c46 Mon Sep 17 00:00:00 2001 From: Hamid Reza Mohammadi Date: Wed, 9 Apr 2025 10:28:14 +0330 Subject: [PATCH] bug fix --- RMuseum/Controllers/ContributionStatsController.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/RMuseum/Controllers/ContributionStatsController.cs b/RMuseum/Controllers/ContributionStatsController.cs index b018c7fb..117369f4 100644 --- a/RMuseum/Controllers/ContributionStatsController.cs +++ b/RMuseum/Controllers/ContributionStatsController.cs @@ -37,6 +37,7 @@ namespace RMuseum.Controllers if (!string.IsNullOrEmpty(res.ExceptionString)) return BadRequest(res.ExceptionString); userContributions = res.Result; + _memoryCache.Set(cacheKey, userContributions); } return Ok(userContributions); } @@ -185,6 +186,7 @@ namespace RMuseum.Controllers default: return BadRequest($"Invalid value for the paramater: dataType = {dataType}"); } + _memoryCache.Set(cacheKey, pagedResult); } // Paging Header HttpContext.Response.Headers.Append("paging-headers", JsonConvert.SerializeObject(pagedResult.PagingMeta)); @@ -323,6 +325,7 @@ namespace RMuseum.Controllers default: return BadRequest($"Invalid value for the paramater: dataType = {dataType}"); } + _memoryCache.Set(cacheKey, pagedResult); } // Paging Header