Options for flushing data cache programmatically (cubes/hierarchies)

Hi, we have many different projects and dashboards managed by different squads of developers, etc. One thing we’d like to do is allow for non-admins ad-hoc clearing of data cache for Cubes and Hierarchies after the database is updated. Currently, the we login to the server and flush the app pools, a very crude method. Ideally, there are two scenarios I’d like advise on…1) building a Dundas report or dashboard that I can allow access to that clears the cache using a button or something, and 2) a script that calls the Dundas API at the end of a data load to flush cache.

On top of that, ideally, it would be even better if the solution could isolate the cubes and hierarchies that need their cache flushed instead of doing the entire application disrupting all active users for a moment. I confess my scripting skills are not great so a real life example would be awesome.

Hi Mike,

It looks like the handling of the datacube caching is entirely an internal function to the application without an existing public API. I have added a feature request for you ref#83248 to have such an API provided.

For in-memory caches such as the data result cache, hierarchy cache, file system cache, etc., you can use this: https://www.dundas.com/support/api-docs/rest/#Dundas%20BI%20REST%20API%20Reference/Admin/Clear/POST.html%3FTocPath%3DDundas%20BI%20REST%20API%20Reference|Admin|_____2

We do use a command like this at the end of some data ETL jobs (bash script):
curl -k -H “Content-Type: application/json” -X POST -d “{“cacheKinds”:“DataResult”}” https://$hostname/API/Admin/Clear/?sessionId=$seshid1
curl -k -H “Content-Type: application/json” -X POST -d “{“cacheKinds”:“Hierarchy”}” https://$hostname/API/Admin/Clear/?sessionId=$seshid1

We can live with that I guess. The draw back is that it impacts entire system…and ours is pretty big…so you end up with a lot of end-users re-populating non-cached objects in the dashboards which can be slow until re-cached.

Any thoughts on a JavaScript solution where we build a dashboard with a button on it to do something similar in ad-hoc fashion? I think i’d like that. I assume we could not somehow specify discrete objects to flush in any scenario but let me know if i’m wong on that. Then I could give a custom report to a team to flush just their object’s cache.

Hi Mike,

I haven’t really played with this enough to say what they large scale ramifications would be but it’s certainly worth investigating. There’s also still that need for a potential API change (feature request) to flush this out and make it work on more objects. I’d recommend sitting down with our customer success team as this might warrant a largest discussion.