· Oct 6, 2016

Invalidate DeepSee Result Cache for a Specific Cube


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?

Discussion (8)1
Log in or sign up to continue

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

&sql(select top 1 id into :id from <sourcetable>)

do ##class(%DeepSee.Utils).%ProcessFact(<cubename>, id)


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.