<< Back

How to clear your Tableau Server cache

First – what is cache on Tableau Server?

The cache server process in version 9.0 is an in-memory store of actions and processes the Server handles. For example when you view a dashboard on the Server the cache will remember the query it ran and the data it returned to load that visualisation. Using cache means that interactions with Tableau Server can run faster after the first time they are requested. This improves the end user experience.

In version 9.0 and later the cache is shared across a server cluster. Meaning that no matter what part of a distributed server a user hits their experience should be the same.

Awesome! So why would I want to clear the cache?
There could be many reasons, but the one’s I could think of include if you want to run some performance tests to see how much having a view in-memory speeds up user performance. You clear the cache, load up a view for the first time and see how long that takes. Then exit, re-load the view and see how much quicker it is.

So how can I do it?

There are two ways. The first is using an undocumented tabadmin command on your Primary server:

tabadmin clearcache

This command is currently not in the Tableau Server online help. So you (probably) heard it here first!

To clear the cache the Tableau Server service has to be stopped. So if you need to clear the cache or just want to test what it does, you’ll have to arrange some down time. I managed to take our Server down, test the clearcache command and get back up and running in less than 10 minutes. But obviously your own Server set-up will affect these times (take them only as a ball-park figure)

How to execute this command:
Log on to your Tableau Server, or your Primary Tableau Server if you’re running a distributed system.

Run Command Prompt as an Administrator (right-click Command Prompt in the Start menu and select “Run as administrator”)

In Command prompt navigate to your Tableau Server bin directory. By default this is “C:Program FilesTableauTableau Serverx.xbin” where x.x is your Server version (e.g. 9.0).

If you have installed your Tableau Server on a different directory you will have to put that location in instead. You can find out more about using tabadmin in the online documentation.

Now you’re ready to enter your tabadmin commands!

To clear the cache the service has to be stopped. Enter the “tabadmin stop” command to stop your Tableau Server. Once the service has been stopped you might want to run a “tabadmin status” command to check it definitely is stopped.

Then you’re able to enter the clear cache command.

“tabadmin clearcache”

clearcache command full

 

Then you can start up your server again with “tabadmin start”. Once started check the status using “tabadmin status -v” for a full run-down of all the processes status’.

Ta da!

The other way is to use a Redis command. The Cache process is Redis underneath, so those commands can also work on the Cache server process.

http://redis.io/commands/flushall

To use a redis command you again need to run Command Prompt as an administrator and enter the command there.

And now off to #data15! See you there maybe?

Emma Whyte

London, UK

4 thoughts on “How to clear your Tableau Server cache

  1. Hey, Emma can you give an example of running redis command from CMD?
    What directory to set and how to execute any command. Thanks!

Leave a Reply

Your email address will not be published. Required fields are marked *