radiasoft / sirepo

Sirepo is a framework for scientific cloud computing. Try it out!
https://sirepo.com
Apache License 2.0
63 stars 31 forks source link

Caching with web sockets #5348

Open robnagler opened 1 year ago

robnagler commented 1 year ago

cache_ok, want_cache, headers_for_cache, headers_for_no_cache, others? should not be called explicitly by APIs. Decisions should be made centrally about caching either through declarations in the schema or centralized business logic.

robnagler commented 12 months ago

This original issue is moot with websockets, but the problem persists. The problem is that JavaScript needs to make decisions about caching, not the server. We need to decide whether to make it persistent. I think the latter is difficult. However, in memory caching of sim frames is easy, and we can simply cache those results until the models are unloaded.

moellep commented 9 months ago

Yes, I think this would be relatively easy to add - all requests go through frameCache, which was originally designed for this purpose before using the browser http cache was used.