Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clear caches from more places on a hot reload event #32509

Merged
merged 4 commits into from
May 12, 2021
Merged

Conversation

pranavkm
Copy link
Contributor

@pranavkm pranavkm commented May 7, 2021

No description provided.

@Pilchie Pilchie added the area-blazor Includes: Blazor, Razor Components label May 10, 2021
@pranavkm pranavkm marked this pull request as ready for review May 10, 2021 20:17
@pranavkm pranavkm requested a review from a team as a code owner May 10, 2021 20:17
@pranavkm
Copy link
Contributor Author

FYI @tommcdon \ @mikem8361

Copy link
Member

@javiercn javiercn left a comment

Choose a reason for hiding this comment

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

LGTM.

Is there a way we could centralize the "clear" behavior into a cache type?

@pranavkm
Copy link
Contributor Author

Is there a way we could centralize the "clear" behavior into a cache type?

I like this. It's less likely we would add a new cache in the future and forget to clear it up if we do this.

Base automatically changed from prkrishn/update-hot-reload to main May 11, 2021 09:53
@SteveSandersonMS
Copy link
Member

SteveSandersonMS commented May 11, 2021

(Deleted comment posted on the wrong PR)

@pranavkm
Copy link
Contributor Author

While centralizing the caches sounds nice on paper, it's a bit difficult. The caches are on a mix of instance and static types which makes the cache lifetime hard to pin down. Additionally, they're also split across several assemblies that do not have IVT access to each other. We definitely don't want to introduce public APIs for caches. I'm going to punt on doing that for now. MVC might be a bit more open to this option since all of it's caches are non-static.

@pranavkm pranavkm added this to the 6.0-preview5 milestone May 12, 2021
@pranavkm pranavkm enabled auto-merge (squash) May 12, 2021 00:15
@pranavkm pranavkm merged commit a14d768 into main May 12, 2021
@pranavkm pranavkm deleted the prkrishn/more-cache branch May 12, 2021 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-blazor Includes: Blazor, Razor Components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants