Invalidate DeepSee Result Cache for a Specific Cube
Hi-
I know that you can run the %Reset method within %DeepSee.Utils to reset all of the DeepSee tasks and reset the entire result cache.
Is there any way to invalidate the result cache for a single cube?
You can call %KillCache method in a cubeclass. It does exactly that. For example:
One concern with using this method is that it actually goes in and kills all of the cache for the cube by killing the globals containing the cache. What affect will this have if it is done while users are using the Analyzer for example?
Empty results or an error probably.
As mentioned already, running ##class(HoleFoods.Cube).%KillCache() would actually go in and purge the internal globals associated with the result cache for that particular cube. Not really the best thing to do on a production system.
A safer way to invalidate cache for a given cube would be to run %ProcessFact for an individual record within the source table for the cube.
For example
replacing <sourcetable> with the source table for your cube and <cubename> with the name of the cube.
This has the effect of causing the result cache for the cube to be invalidated without completely purging the internal globals that store the cache. This is much safer to run during production times than the %KillCache() method.
It would only invalidate one chunk (most probably first, but ultimately it depends on id) of cube data, not all of them.
So if we were to use the APIs to update the dimension table directly for example, this would not be adequate to insure that future queries showed the proper data?
It would, because cache for that chunk would be invalidated, and cache for other chunks would still be valid. But OP wants to invalidate cache for a whole cube, and for that inserting one fact is not enough.
So this begs the question, how could one invalidate the result cache for the entire cube without running %KillCache as that purges the underlying globals and would interfere with actively running queries, correct?
Social networks
InterSystems resources
Log in or sign up
Log in or create a new account to continue
Log in or sign up
Log in or create a new account to continue
Log in or sign up
Log in or create a new account to continue