Skip to content

Is there functionality to disable query caching?Β #9788

@hnightingale1-r7

Description

@hnightingale1-r7

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!

Metadata

Metadata

Assignees

Labels

questionThe issue is a question. Please use Stack Overflow for questions.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions