azure-data-explorerkql

Turning off Kusto database cache policy not reflecting in reduced cache as shown by .show cache command


I have a kusto cluster with only a single database. We have had 3-4 months of cache policy defined on the database. There is no table level overridden cache policy. So now suddenly we have deleted the cache policy on the database for some reason. But when I fire .show cache (and I did before deleting the cache policy too), I don't see any difference in cache held by various nodes,it's still the same almost. Does it take some turnaround time for flushing out existing data from cache? Can we somehow force this flushing?


Solution

  • the .show cache command is undocumented and the structure/results it returns are not contractual (i.e. you shouldn't take any dependency on them).

    you can't control when artifacts get evicted from the cache or trigger that on your own.

    you can control which portion of the data, defined using a timespan value, measured since the moment data gets ingested - should be cached on the cluster's nodes' SSDs (this timespan is defined as part of the caching policy.

    data artifacts will be evicted from the cache if/as necessary, according to the effective caching policy.

    to see the effects of caching policy changes, you could: