From 587d697d8fe2383e1f787c3507fa26841f4373d1 Mon Sep 17 00:00:00 2001 From: Mezdelex Date: Wed, 31 Jul 2024 09:51:49 +0200 Subject: [PATCH] fix(cache): made caching keys Command/Query name and metadata arguments dependant --- .../Categories/GetAllAsync/GetAllCategoriesQueryHandler.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Application/Categories/GetAllAsync/GetAllCategoriesQueryHandler.cs b/src/Application/Categories/GetAllAsync/GetAllCategoriesQueryHandler.cs index d348677..dae15f2 100644 --- a/src/Application/Categories/GetAllAsync/GetAllCategoriesQueryHandler.cs +++ b/src/Application/Categories/GetAllAsync/GetAllCategoriesQueryHandler.cs @@ -37,7 +37,7 @@ CancellationToken cancellationToken .ToPagedListAsync(request.Page, request.PageSize, cancellationToken); await _redisCache.SetCachedData>( - nameof(GetAllCategoriesQuery), + $"{nameof(GetAllCategoriesQuery)}#{request.Page}#{request.PageSize}", pagedCategories, DateTimeOffset.Now.AddMinutes(5) );