-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Description
Problem
Is there a way to bypass cubes query cache? I can see in the orchestrator query cache class
there is a forceNoCache flag for the QueryBody but it doesn't look like this is configurable from what I can see and is this something that could be made configurable?
To give context around why I am looking bypass this, is I am running multiple trino clusters which have a centralised cache and trino makes use of the open policy agent . Each request the query will be modified and filtered based on the permissions of the user.
I explored the avenue of adding a unique field to the security context to try force a new cachestore to be created on each request, to bypass the cache but wasn't successful in doing so.
Related Cube.js schema
queryRewrite: (query, context) => {
if (!context.securityContext) {
context.securityContext = {};
}
context.securityContext._cacheBuster = Date.now();
return query;
},If there is any other suggestions on how I might achieve this that would be great or if this is something that could be potentially added?
Thanks in advance!