Skip to content

Commit 7cb7fe1

Browse files
authored
Merge pull request #373 from djsleurink/net6.0-caching-4-refreshfix
Net6.0 Caching example 4 - counter is not matching the amount of page refreshes
2 parents d37c5d2 + 18b8cbe commit 7cb7fe1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

projects/caching/caching-4/Program.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323

2424
app.Run(async context =>
2525
{
26+
if (context.Request.Path == "/favicon.ico") return;//skip favicon request
27+
2628
var log = context.RequestServices.GetService<ILoggerFactory>().CreateLogger("app");
2729
var cache = context.RequestServices.GetService<IMemoryCache>();
2830
var greeting = cache.Get(CACHE_KEY) as string;

0 commit comments

Comments
 (0)