Open robnagler opened 1 year 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.
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.
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.