[PUI] Reduce duplicate queries
Platform interface currently performs a number of duplicate API queries which slows down page response time.
We could define some small amount of caching time in tanstack query. That way when the same query is performed multiple times in the loading process, only the first is send to the server.
@SchrodingersGat could this be the permission check page? I have various issues with multiple requests since that merged
@wolflu05 How would this cache be invalidated once things change because of a query? Is there a mechanism for that?
I have various issues with multiple requests since that merged
Me too. I think Oliver is already working on a fix in #7598. Hope that gets merged soon.
How would this cache be invalidated once things change because of a query? Is there a mechanism for that?
We could set the (frontend) caching to a small time like 1s to 5s and also invalidate the entries after the user creates or updates something. Since we have all in generic components, that shouldn't be to hard. There is documentation for invalidation here. Detailed documentation for how caching works can be found here.
This has been largely addressed, enough that I am happy to close out this issue. Will continue to monitor for any query issues