mikependon / RepoDB

A hybrid ORM library for .NET.
Apache License 2.0
1.7k stars 125 forks source link

Using Memory Cache #1173

Closed rubenalves closed 5 months ago

rubenalves commented 5 months ago

Is there any examples of using memory cache ?

I see this example on the documentation but it does not say how to implement the Cache object.

`var cache = CacheFactory.GetMemoryCache();

using (var connection = new SqlConnection(connectionString)) { var products = connection.QueryAll(cacheKey: "products", cache: cache); }`

mikependon commented 5 months ago

The MemoryCache page should help.

rubenalves commented 5 months ago

Got it. Thanks.