Skip to content

Commit dc85415

Browse files
authored
Update query-cache.md
1 parent 64ada1b commit dc85415

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

docs2/pages/documentations/query-cache.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ var countries1 = ctx.Countries.FromCache().ToList();
2525
var countries2 = ctx.Countries.FromCache().ToList();
2626

2727
```
28-
{% include component-try-it.html href='https://dotnetfiddle.net/nx9A2H' %}
28+
[Try it in EF6](https://dotnetfiddle.net/nx9A2H) | [Try it in EF Core](https://dotnetfiddle.net/EZZkhP)
2929

3030
## EF+ Query Cache
3131

@@ -44,7 +44,7 @@ var countries = ctx.Countries.Where(x => x.IsActive).FromCache();
4444
var states = ctx.States.Where(x => x.IsActive).FromCache(DateTime.Now.AddHours(2));
4545

4646
```
47-
{% include component-try-it.html href='https://dotnetfiddle.net/BcScGT' %}
47+
[Try it in EF6](https://dotnetfiddle.net/BcScGT) | [Try it in EF Core](https://dotnetfiddle.net/z5gyPI)
4848

4949
## EF+ Query Cache Async
5050

@@ -79,7 +79,7 @@ var count = ctx.Customers.Count();
7979
// Oops! All customers are cached instead of customer count.
8080
var count = ctx.Customers.FromCache().Count();
8181
```
82-
{% include component-try-it.html href='https://dotnetfiddle.net/SOjxeY' %}
82+
[Try it in EF6](https://dotnetfiddle.net/SOjxeY) | [Try it in EF Core](https://dotnetfiddle.net/3EXZBt)
8383

8484
**EF+ Query Deferred** has been created to resolve this issue, the resolution is now deferred instead of being immediate which lets us cache the expected result.
8585

@@ -92,7 +92,7 @@ var ctx = new EntitiesContext();
9292
var count = ctx.Customers.DeferredCount().FromCache();
9393

9494
```
95-
{% include component-try-it.html href='https://dotnetfiddle.net/4MUlef' %}
95+
[Try it in EF6](https://dotnetfiddle.net/4MUlef) | [Try it in EF Core](https://dotnetfiddle.net/V0G6pe)
9696

9797
Query Deferred supports all Queryable extension methods and overloads.
9898

@@ -117,7 +117,7 @@ QueryCacheManager.ExpireTag("countries");
117117
:bulb: Use Enum instead of hard-coding string for tag name.
118118

119119
```
120-
{% include component-try-it.html href='https://dotnetfiddle.net/RScINk' %}
120+
[Try it in EF6](https://dotnetfiddle.net/RScINk) | [Try it in EF Core](https://dotnetfiddle.net/PUQCCY)
121121
122122
## EF+ Query Cache Expiration
123123

@@ -139,7 +139,7 @@ var options = new MemoryCacheEntryOptions() { SlidingExpiration = TimeSpan.FromH
139139
var states = ctx.States.FromCache(options);
140140

141141
```
142-
{% include component-try-it.html href='https://dotnetfiddle.net/f57ZoI' %}
142+
[Try it in EF6](https://dotnetfiddle.net/f57ZoI)
143143
144144
## EF Query Cache Control
145145

@@ -157,7 +157,7 @@ QueryCacheManager.Cache = MemoryCache.Default;
157157
QueryCacheManager.Cache = new MemoryCache(new MemoryCacheOptions());
158158

159159
```
160-
{% include component-try-it.html href='https://dotnetfiddle.net/mIhcff' %}
160+
[Try it in EF6](https://dotnetfiddle.net/mIhcff) | [Try it in EF Core](https://dotnetfiddle.net/6ISVBT)
161161
162162
You can set default policy
163163

@@ -173,7 +173,7 @@ var options = new MemoryCacheEntryOptions() { SlidingExpiration = TimeSpan.FromH
173173
QueryCacheManager.DefaultMemoryCacheEntryOptions = options;
174174

175175
```
176-
{% include component-try-it.html href='https://dotnetfiddle.net/7JptcT' %}
176+
[Try it in EF6](https://dotnetfiddle.net/7JptcT)
177177
178178
## Real Life Scenarios
179179

0 commit comments

Comments
 (0)