RepoDB icon indicating copy to clipboard operation
RepoDB copied to clipboard

How to use ExecuteQueryMultiple cache?

Open seongguk92 opened this issue 3 years ago • 0 comments

Hello. I am using it so well. Is there any way to use cache for ExecuteQueryMultiple ?

var cache = CacheFactory.GetMemoryCache();
using (var connection = new SqlConnection(connectionString))
{
    var expirationInMinutes = 60 * 24; // 1 day
    var products = connection.QueryAll<Product>(cacheKey: "products",
        cacheItemExpiration: expirationInMinutes, cache: cache);
}

When proceeding with a paging operation Call two select statements.

(paging data (5)/ total count (21))

seongguk92 avatar Apr 20 '22 11:04 seongguk92