Skip to content

Document Redis client builder pattern from Aspire 9.5#434

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/add-redis-client-builder-pattern
Draft

Document Redis client builder pattern from Aspire 9.5#434
Copilot wants to merge 2 commits intomainfrom
copilot/add-redis-client-builder-pattern

Conversation

Copy link
Contributor

Copilot AI commented Feb 18, 2026

Aspire 9.5 introduced a new Redis client builder pattern with fluent configuration for distributed caching and Azure authentication. This was documented in the what's new page but missing from the redis-integration reference.

Changes

Adds "Redis client builder pattern" section to redis.mdx with:

  • Basic usage - AddRedisClientBuilder with WithDistributedCache for fluent configuration
  • Azure authentication - WithAzureAuthentication extension requiring Aspire.Microsoft.Azure.StackExchangeRedis package
  • Auto activation - DisableAutoActivation configuration option (disabled by default, planned for future default)

Example

builder.AddRedisClientBuilder("redis")
    .WithAzureAuthentication()
    .WithDistributedCache(options =>
    {
        options.InstanceName = "MyApp";
    });

Screenshots

Full page:
Full page

New section:
Redis client builder pattern section

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/CommunityToolkit/Aspire
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node ./scripts/update-github-stats.js (http block)
  • https://api.github.com/repos/CommunityToolkit/Aspire/contributors
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/aspire.dev/aspire.dev/src/frontend/node_modules/.bin/../astro/astro.js build (http block)
  • https://api.github.com/repos/dotnet/aspire
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node ./scripts/update-github-stats.js (http block)
  • https://api.github.com/repos/dotnet/aspire-samples
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node ./scripts/update-github-stats.js (http block)
  • https://api.github.com/repos/dotnet/aspire-samples/contributors
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/aspire.dev/aspire.dev/src/frontend/node_modules/.bin/../astro/astro.js build (http block)
  • https://api.github.com/repos/dotnet/aspire/contributors
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/aspire.dev/aspire.dev/src/frontend/node_modules/.bin/../astro/astro.js build (http block)
  • https://api.github.com/repos/microsoft/aspire.dev
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node ./scripts/update-github-stats.js (http block)
  • https://api.github.com/repos/microsoft/aspire.dev/contributors
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/aspire.dev/aspire.dev/src/frontend/node_modules/.bin/../astro/astro.js build (http block)
  • https://api.github.com/repos/microsoft/dcp
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node ./scripts/update-github-stats.js (http block)
  • https://api.github.com/repos/microsoft/dcp/contributors
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/aspire.dev/aspire.dev/src/frontend/node_modules/.bin/../astro/astro.js build (http block)
  • learn.microsoft.com
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/aspire.dev/aspire.dev/src/frontend/node_modules/.bin/../astro/astro.js build (dns block)
  • telemetry.astro.build
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/aspire.dev/aspire.dev/src/frontend/node_modules/.bin/../astro/astro.js build (dns block)
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/aspire.dev/aspire.dev/src/frontend/node_modules/.bin/../astro/astro.js dev git log %D �� %b �� %aN �� %aE ���� --follow it -3.mdx --follow s/.bin/git git log %D �� %b �� %aN �� %aE ���� --follow 0/x64/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin/git aspire.mdx --follow odules/pnpm/distpnpm --dir ./src/frontend run dev git (dns block)
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/aspire.dev/aspire.dev/src/frontend/node_modules/.bin/../astro/astro.js dev git log �� %aI �� %s �� src/frontend/src/content/docs/integrations/databases/efcore/azure-cosmos-db/azurbash --follow in/git /index.mdx --follow it git log ro . -- --check --follow .1_jiti@1.21.7_rollup@4.53.3_typescript@5.9.3_/node_modules/@astrojs/starlight/node_modules/.bincheck-data ats-new/aspire-9sh REDACTED e/git git (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>[What's New Analysis] Add Redis client builder pattern to redis-integration</issue_title>
<issue_description>## Summary

Aspire 9.5 introduced a new Redis client builder pattern with fluent configuration for distributed caching and Azure authentication. Not documented in redis-integration.

What's Missing

From what's-new-in-aspire-95:

Basic Usage

var builder = WebApplication.CreateBuilder(args);

builder.AddRedisClientBuilder("redis")
    .WithDistributedCache(options => {
        options.InstanceName = "MyApp";
    });

Azure Authentication

// Requires Aspire.Microsoft.Azure.StackExchangeRedis package
builder.AddRedisClientBuilder("redis")
    .WithAzureAuthentication()
    .WithDistributedCache(options => {
        options.InstanceName = "MyApp";
    });

Auto Activation

// Auto activation is disabled by default, enable with:
builder.AddRedisClient("redis", c => c.DisableAutoActivation = false);

Suggested Content

Add to redis-integration doc, Client integration section:

  1. Client builder pattern - AddRedisClientBuilder fluent API
  2. Distributed caching - WithDistributedCache configuration
  3. Output caching - WithOutputCache if supported
  4. Azure authentication - WithAzureAuthentication with separate package
  5. Auto activation - DisableAutoActivation option</issue_description>

<agent_instructions>Have a look at this and make sure we're good: https://aspire.dev/whats-new/aspire-9-5/</agent_instructions>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: IEvangelist <7679720+IEvangelist@users.noreply.github.com>
Copilot AI changed the title [WIP] Add Redis client builder pattern to redis-integration Document Redis client builder pattern from Aspire 9.5 Feb 18, 2026
Copilot AI requested a review from IEvangelist February 18, 2026 04:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[What's New Analysis] Add Redis client builder pattern to redis-integration

2 participants