Commit 1195a6c
Move MemoryCache creation outside lambda; clarify DI cache sharing
Create the MemoryCache instance outside the AddDbContext lambda to avoid
creating multiple instances. Add note that the DI-based approach shares
the cache between EF Core and other services.
Agent-Logs-Url: https://github.com/dotnet/EntityFramework.Docs/sessions/578f8c2e-3eba-404b-8c17-ec1293337639
Co-authored-by: AndriySvyryd <6539701+AndriySvyryd@users.noreply.github.com>1 parent a2e7393 commit 1195a6c
1 file changed
Lines changed: 4 additions & 2 deletions
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
331 | 331 | | |
332 | 332 | | |
333 | 333 | | |
| 334 | + | |
| 335 | + | |
334 | 336 | | |
335 | 337 | | |
336 | | - | |
| 338 | + | |
337 | 339 | | |
338 | 340 | | |
339 | 341 | | |
340 | 342 | | |
341 | | - | |
| 343 | + | |
342 | 344 | | |
343 | 345 | | |
344 | 346 | | |
| |||
0 commit comments