mailwal

.NET Drip for 2026-10-18

.NET Drip4 min read
A weekly dose of C# and .NET programming insights, tutorials, and community news delivered straight to your inbox.

You have a server-rendered Blazor page where one component does expensive work. The rest of the page is personal, changes often, or simply doesn't belong in an output cache.

Caching the whole response is too much. Running the expensive component on every request is too little.

.NET 11 adds CacheView, which caches the rendered output of one component subtree during static server-side rendering.

Try It

Create a .NET 11 Blazor Web App with global static rendering:

dotnet new blazor -n CacheViewDemo -f net11.0 --interactivity None
cd CacheViewDemo

Add Components/Pages/Products.razor:

@page "/products"

<PageTitle>Products</PageTitle>

<h1>Products</h1>

<p>This timestamp changes with every request: @DateTimeOffset.Now</p>

<CacheView VaryByQuery="category"
           ExpiresAfter="TimeSpan.FromSeconds(30)">
    <ProductList Category="@Category" />
</CacheView>

@code {
    [SupplyParameterFromQuery]
    public string Category { get; set; } = "keyboards";
}

Add Components/ProductList.razor:

<div class="alert alert-secondary">
    <strong>Rendered at:</strong> @renderedAt
    <br />
    <strong>Category:</strong> @Category
</div>

@code {
    [Parameter, EditorRequired]
    public string Category { get; set; } = "";

    private readonly DateTimeOffset renderedAt = DateTimeOffset.Now;
}

Run the app:

dotnet run

Open /products?category=keyboards and refresh the page. The timestamp outside CacheView changes. The timestamp inside stays put for 30 seconds.

Change the category:

/products?category=monitors

VaryByQuery="category" creates a different cache entry for that query value.

What Happens on a Cache Hit

Blazor replays the cached markup. It doesn't instantiate ProductList, and it doesn't run that component's lifecycle.

That is the real win when the child component performs an expensive database query or builds a large chunk of mostly static HTML.

When Not to Use It

Don't cache user-specific, permission-sensitive, or interactive output unless your cache key varies by everything that makes the result different.

CacheView is for static SSR. If the child needs interactive state or must run on every request, caching its markup is the wrong tool.

Key Takeaway

CacheView lets you cache one expensive region of a static Blazor page without caching the entire response. Vary the entry by the inputs that matter, and be honest about whether the output is safe to share.


Notable Links

Quack Quack: Duck-Typing in C# with Interceptors

Steven Giesel explores a playful take on duck typing in C# using .NET 8 interceptors and a source generator to adapt any type that matches an interface-shaped contract. This post demystifies [InterceptsLocation] and the tiny generated adapters behind structural calls, highlighting where the trick shines, its tradeoffs, and why it currently feels more PoC than production.

Skeleton 3.0 for your .NET MAUI apps!

Horus Studio's Skeleton 3.0 brings polished, customizable loading states to .NET MAUI apps with zero dependencies, simple attached properties, and fresh animations like Shimmer, Aurora, and Tint that wire up cleanly to your IsBusy flags. This post covers .NET 8 to 10 support, a playground for picking layouts and effects, and even an AI skill that scaffolds placeholders in your existing XAML so real apps feel faster while data loads.

Mono vs CoreCLR in .NET MAUI: Performance, Compatibility, and What Changes in.NET 11

Imman Kumar Palanikumar explains what the Mono to CoreCLR switch in .NET 11 means for .NET MAUI apps on Android, iOS, tvOS, and Mac Catalyst, highlighting how the runtime change can influence startup, memory, diagnostics, and package size without demanding source rewrites. This post compares architectures and real device results, and closes with a practical checklist to baseline on .NET 10, measure real performance, and sanity check third-party libraries before upgrading.

Learn Uno Platform with Tim Corey, Free for Two Weeks

Tim Corey and Uno Platform team up in this post to launch a 66-lesson, start-to-finish course that takes you from prompt to production with Uno Platform Studio and C#, shipping real apps for web, desktop, and mobile. It leans into MVUX, Hot Reload and Hot Design, plus MCP-powered AI that you learn to direct rather than just accept, and enrollment is free for two weeks with lifetime access.

Share your .NET story with the community

Luis Quintanilla shares how Microsoft is gathering real-world .NET stories ahead of .NET Conf 2026, the free virtual event on Nov 10-12 where .NET 11 debuts. This post highlights what makes a standout story across modernization, performance, security, and AI scenarios, and how selected projects might appear in keynotes or the .NET customer showcase.

EF Core Specifications for Includes, Projection, and Tracking

Nick Cosentino reframes EF Core specifications as a full query envelope, designing the result contract first with DTO projection, deliberate Includes, explicit tracking modes, and single or split query selection. You will pick up a practical sequence to avoid over-fetching and make behavior testable with relational proofs of generated SQL and command counts.


Easier to read in your browser?

You can find this issue at https://dotnetdrip.com/archive/2026-10-18/.


Sponsored by Superhuman
1,000+ Proven ChatGPT Prompts That Help You Work 10X Faster
ChatGPT is insanely powerful. But most people waste 90% of its potential using it like Google. These 1,000+ proven ChatGPT prompts fix that and help you work 10X faster.
Sign up for Superhuman AI and get 1,000+ ready-to-use prompts tested by 1M+ professionals, plus the Superhuman AI newsletter (3 min daily) to keep you ahead in your career.
x-twitterdiscordyoutubetwitchexternal-link

This dropped into your inbox because you subscribed at dotnetdrip.com or one of Michael Jolley's other web properties.

Did this hurt your brain? You can stop receiving future .NET Drips by unsubscribing at any time.

PO Box 795, Odenville, AL 35120