Open sharat87 opened 3 years ago
Conversation on this (pasting almost verbatim here for giving the background and context):
I was more concerned about reducing unnecessary load on the database but obviously there is a performance aspect as well. Possibly there is not a load issue as I haven't done any measuring but it just seems like good sense to not hit the database unless needed especially if you know the data has not changed
Yeah I agree. This is something to carefully think about with regards to how this is going to look and feel for the overall UX of action execution. Following along that train of though, say there's a configurable-TTL based caching for actions, I'm guessing there should also be a way to force fetch from the database bypassing the cache as well, right?
I was leaning away from session cache and just cache based on SQL statements so the same query with different query parameters would be cached individually - for general lookup queries that typically have the same query parameters the result would be cached once and shared with all users
Right, but they would still need a predictable way of busting the cache, TTL or force-load or both (useful when the data in the database changes externally). For general queries not dependent on user information, I'm guessing the query SQL itself would be the same for all users and so this same caching mechanism would work out in our favor.
Different but somwhat related: https://github.com/appsmithorg/appsmith/issues/8639
Since the auto-load queries execute every time we switch pages, there can be a lot of flickering when we have a lot of tables with queries. If we can cache these results at least in the browser at a session level, that can reduce such potential flickering at least until the browser is refreshed. This stems from the below broader message posted on Discord: