Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Sep 8, 2025

The documentation in Lesson 5 incorrectly instructed students to DELETE the entire AddOutputCache configuration block when integrating Redis output caching:

// Add default output caching
services.AddOutputCache(options =>
{
    options.AddBasePolicy(builder => builder.Cache());
});

However, examining the /complete solution reveals this code should be modified, not deleted. The complete solution retains the AddOutputCache configuration but adds cache tagging:

// Add default output caching
services.AddOutputCache(options =>
{
    options.AddBasePolicy(builder => builder.Tag("AllCache")
                            .Cache());
});

This change:

  • Corrects the documentation to instruct students to modify the existing code rather than delete it
  • Preserves output caching functionality that works alongside Redis integration
  • Enables cache invalidation through the "AllCache" tag used elsewhere in the complete solution
  • Aligns with the actual implementation shown in the complete solution

The Redis output cache integration (builder.AddRedisOutputCache("cache")) works by redirecting the existing output cache configuration to use Redis instead of in-memory storage, making the preservation of this configuration essential.

Fixes #183.

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:

  • aka.ms
    • Triggering command: curl -I -sSL --retry 5 --retry-delay 2 --connect-timeout 15 REDACTED (dns block)

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


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

@Copilot Copilot AI changed the title [WIP] Check MemoryCaching code in Lesson 5 Fix memory caching documentation in Lesson 5 - correct DELETE instruction to MODIFY Sep 8, 2025
@Copilot Copilot AI requested a review from jongalloway September 8, 2025 20:06
Copilot finished work on behalf of jongalloway September 8, 2025 20:06
@jongalloway jongalloway requested a review from Copilot September 10, 2025 17:27
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR corrects documentation in Lesson 5 that incorrectly instructed students to delete the AddOutputCache configuration when integrating Redis output caching. The fix changes the instruction from deletion to modification, aligning the documentation with the actual implementation in the complete solution.

Key Changes

  • Corrects lesson instructions to modify rather than delete the AddOutputCache configuration
  • Adds cache tagging functionality (Tag("AllCache")) to enable cache invalidation
  • Updates explanatory text to clarify how Redis integration works with existing output cache policies

@csharpfritz csharpfritz marked this pull request as ready for review October 2, 2025 18:28
@csharpfritz csharpfritz merged commit 4811943 into main Oct 2, 2025
2 checks passed
@csharpfritz csharpfritz deleted the copilot/fix-183 branch October 2, 2025 18:28
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.

Check MemoryCaching code in Lesson 5

3 participants