Closed josephaw1022 closed 10 months ago
I'm not opposed to that, but we should at least mention that the connection string option is available to the readers. Would you be interested in creating a pull request @josephaw1022? If so, I could assign this issue to you and review the corresponding PR - just let me know.
@IEvangelist I agree to your first point and absolutely
@IEvangelist I noticed the usage of _appsettings.json and not appsettings.json. Is that on purpose or was that just a typo that I can fix?
I think I figured it out. I am guessing typo from this spike repo that I just made.
@IEvangelist I noticed the usage of _appsettings.json and not appsettings.json. Is that on purpose or was that just a typo that I can fix?
Yeah, that's a typo. All references to files or directories should be styled as italics.
Type of issue
Other (describe below)
Description
Summary
I've noticed that the instructions suggest adding the Redis connection string to the appsettings.json file in the ui and api project. While this approach works, I believe it's unnecessary. Instead, it would be more intuitive to first show the "Configure the App Host project" Section and then proceed to the 'Configure the API with Distributed Caching' section, omitting the connection string part altogether.
My suggestion to rearrange the content in this order stems from the opportunity to demonstrate an example of 'Implicit Service Discovery by Reference'. This would also showcase the simplicity of setting up Redis with Aspire.
What I am suggesting for the tutorial structure
Prerequisites
...
Create the project
...
Configure the App Host project
...
Configure the UI with output caching
... (omit connection string)
builder.AddRedisDistributedCache("cache");
Configure the API with distributed caching
... (omit connection string)
builder.AddRedisDistributedCache("cache");
Test the app locally
...
Explain Some of the Magic of Aspire (New Section)
Page URL
https://learn.microsoft.com/en-us/dotnet/aspire/caching/caching-components
Content source URL
https://github.com/dotnet/docs-aspire/blob/main/docs/caching/caching-components.md
Document Version Independent Id
76ef3cc2-e49d-d8da-b6d0-57fac1e9c332
Article author
@IEvangelist
Associated WorkItem - 199395