Question
· Jun 30, 2016

Turn off Deepsee cache system or cube widely

Hi,

Is there system wide or cube wide setting can turn off the deepsee query cache, or force query to compute without using cache ?

Many thanks in adavance.

Cheng Cheng

Discussion (2)0
Log in or sign up to continue

Cube has 2 methods:

  • %OnGetFilterSpec  - callback method which executes for every query and gives a Cube a chance to programmatically define a filter spec
  • %KillCache - deletes all cached values for the cube

If you combine them like this, you can get what you want:

ClassMethod %OnGetFilterSpec(pFilterSpec As %String) As %String
{
    Do  ..%KillCache()
    Quit pFilterSpec
}

Note, that %OnGetFilterSpec   has an access to %query object which is of %DeepSee.Query.query  class. I tried to set  some of it params but it didn't seem to help:

Set %query.useCache = $$$NO
Set %query.%mustCompute = $$$YES

You can try to modify %query some other way, or you can try set a query error global node

Set $$$DeepSeeResultsGLVN(%cubeIndex, %query.%QueryKey,"error") = "whatever"

It forces the query to recompute the results.

I think it's definitely doable, but you need to tinker with either %query or query  global cache. Well, it depends on the purpose: if it's low traffic/dev system killing all the cube cache is ok, but you may want to kill the cache only  for a current query.