Skip to content

Commit 18b8cbe

Browse files
committed
Net6.0 Caching example 4 - counter is not matching the amount of page refreshes
1 parent 6af921d commit 18b8cbe

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)