The Wayback Machine - https://web.archive.org/web/20220215145636/https://github.com/dotnet/aspnetcore/issues/40249
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 caching persists even with 'no-cache' header (nginx) #40249

Open
1 task done
ctigrisht opened this issue Feb 15, 2022 · 0 comments
Open
1 task done

Blazor WASM caching persists even with 'no-cache' header (nginx) #40249

ctigrisht opened this issue Feb 15, 2022 · 0 comments

Comments

@ctigrisht
Copy link

@ctigrisht ctigrisht commented Feb 15, 2022

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

I am unable to clear the cache automatically when I publish a new version in blazor, I have checked online and most solution are either:

  • enable 'no-cache' (doesn't have any effect)
  • clear content using JS if a new version is available (complex to implement)

so I am asking in the official blazor repository to know what are the possible ways to enable smart caching (load the new version if the files have changed, but keep the app within cache) since the framework was designed here

This is the following config in nginx for my location /

add_header 'Cache-Control' 'no-cache' always;
root /home/[user]/apps/blazorapp/wwwroot/;
try_files $uri $uri/ /index.html =404;

Expected Behavior

When I go to the app, it should use the new files if they have been updated

Steps To Reproduce

No response

Exceptions (if any)

No response

.NET Version

6.0.102

Anything else?

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant