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

[browser] Cache identity per query string #85775

Open
pavelsavara opened this issue May 4, 2023 · 9 comments
Open

[browser] Cache identity per query string #85775

pavelsavara opened this issue May 4, 2023 · 9 comments
Assignees
Milestone

Comments

@pavelsavara
Copy link
Member

The cache in the WebAssemblyResourceLoader and also the memory snapshot creates different cache for each app.
The current logic takes index.html?item=123 out of http://localhost:53504/index.html?item=123 as cache name.

Therefore the cache is not loaded when user arrived from external deep link item=123 or if the same app has multiple html pages.

If we fully migrate to assets hashes in the asset name, we could drop WebAssemblyResourceLoader.
But the problem would stay for memory snapshot.

@maraf suggested that we could generate Application GUID during build. I guess we would put it into the boot.config.json ?

@ghost
Copy link

ghost commented May 4, 2023

Tagging subscribers to 'arch-wasm': @lewing
See info in area-owners.md if you want to be subscribed.

Issue Details

The cache in the WebAssemblyResourceLoader and also the memory snapshot creates different cache for each app.
The current logic takes index.html?item=123 out of http://localhost:53504/index.html?item=123 as cache name.

Therefore the cache is not loaded when user arrived from external deep link item=123 or if the same app has multiple html pages.

If we fully migrate to assets hashes in the asset name, we could drop WebAssemblyResourceLoader.
But the problem would stay for memory snapshot.

@maraf suggested that we could generate Application GUID during build. I guess we would put it into the boot.config.json ?

Author: pavelsavara
Assignees: pavelsavara, maraf
Labels:

arch-wasm, area-System.Runtime.InteropServices.JavaScript

Milestone: 8.0.0

@pavelsavara
Copy link
Member Author

cc @javiercn thoughts ?

@maraf
Copy link
Member

maraf commented May 4, 2023

I believe the cache key could/should be similar to what @pavelsavara implemented for memory snapshot cache - hash of all configuration params + assets hashes

@pavelsavara
Copy link
Member Author

I think we could still do this in net8 after #89435

@pavelsavara
Copy link
Member Author

It may improve situation for dotnet/aspnetcore#41353

@pavelsavara
Copy link
Member Author

I think we are close to be able to drop the custom Cache and use just HTTP cache + names with hash in it.

@maraf
Copy link
Member

maraf commented Jul 24, 2024

I think we are close to be able to drop the custom Cache and use just HTTP cache + names with hash in it.

After the last discussion, this is not the case ATM. Keeping this open

@maraf maraf modified the milestones: 9.0.0, 10.0.0 Jul 24, 2024
@pavelsavara
Copy link
Member Author

We agreed to drop the cache in Net10, what is holding us back now ?

@maraf
Copy link
Member

maraf commented Oct 9, 2024

We agreed to drop the cache in Net10, what is holding us back now ?

The cache is important for blazor standalone scenario (where you don't have hosting server under control).

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

No branches or pull requests

2 participants