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

[Blazor WASM] Serve cached assemblies from ASP.NET Core Server #18448

Closed
michuny25 opened this issue Jan 19, 2020 · 1 comment
Closed

[Blazor WASM] Serve cached assemblies from ASP.NET Core Server #18448

michuny25 opened this issue Jan 19, 2020 · 1 comment
Labels
area-blazor Includes: Blazor, Razor Components

Comments

@michuny25
Copy link

michuny25 commented Jan 19, 2020

I am running ASP.NET Core 3.1 Server which hosts API and also serves Client-Side Blazor files.
I tried to speed up the loading of the Blazor WASM assemblies in /_framework folder using CloudFlare CDN.

However, even if I create a site policy for mydomain.example/_framework/* then it's still not being cached and the status of the assemblies is cf-cache-status:REVALIDATED because the ASP.NET Core server serving Client-Side Blazor does not allow CloudFlare to cache the files in /_framework. The CDN thinks there's always a newer version on the server.

My server is using extension in Startup to serve Client-Side Blazor:
app.UseClientSideBlazorFiles<Client.Startup>();

Is there a way how to make Blazor assemblies to be cachable? If not, can the extension have some options about caching the Blazor content which is being served and allow to cache assemblies in /_framework?

@rynowak rynowak added feature-blazor-wasm This issue is related to and / or impacts Blazor WebAssembly area-blazor Includes: Blazor, Razor Components and removed feature-blazor-wasm This issue is related to and / or impacts Blazor WebAssembly labels Jan 19, 2020
@javiercn
Copy link
Member

@michuny25 thanks for contacting us.

We'll likely handle this as part of #16956

I'm closing this issue in favor of that one.

@ghost ghost locked as resolved and limited conversation to collaborators Feb 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-blazor Includes: Blazor, Razor Components
Projects
None yet
Development

No branches or pull requests

3 participants