Automated AR System MidTier Instances Cache flusing

September 8th, 2010 by Venkat Leave a reply »

If you have a lot of Midtier Instances it is very cumbrous to flash all caches manually.

With this Windows batch script it is easy to flush all caches automatically.

Put the following content into a batch file and execute it. Windows XP don’t provide a sleep command, but you can download the Windows Resource Kit 2003 which will provide a sleep command.

Example for three Midtier instances:

start /B firefox.exe <url>/shared/config/config.jsp
sleep 10
start /B firefox.exe -new-tab <url>/shared/config/config.jsp
start /B firefox.exe -new-tab <url>/shared/config/config.jsp
sleep 10
start /B firefox.exe -new-tab
<url>/servlet/GoatConfigServlet?action=logon^&password=<password>
start /B firefox.exe -new-tab
<url>/servlet/GoatConfigServlet?action=logon^&password=<password>
start /B firefox.exe -new-tab
<url>/servlet/GoatConfigServlet?action=logon^&password=<password>
sleep 10
start /B firefox.exe -new-tab
<url>/servlet/GoatConfigServlet?action=Cache^&cache_flush=Yes
start /B firefox.exe -new-tab
<url>/servlet/GoatConfigServlet?action=Cache^&cache_flush=Yes
start /B firefox.exe -new-tab
<url>/servlet/GoatConfigServlet?action=Cache^&cache_flush=Yes

Note: Update the bat file if necessary, like the browser that being used and login credentials

Get the batch file here.

Credits: risbo710 (REM Boris, Noack@eon.com)

Advertisement

3 comments

  1. Raje says:

    Hi venkat ,

    Please post the similar automatic cache flusing file works in IE browser since my application runs in IE .

    Thanks .

  2. Dan says:

    Hi Raje,
    Here is how you could perform the same task for 1 MT using IE instead of Firefox. I also added a line to kill the iexplore.exe process at the end of the batch command to free up system resources following the batch execution. Enjoy!

    start /D iexplore.exe /shared/config/config.jsp
    sleep 10
    start /D iexplore.exe /servlet/GoatConfigServlet?action=logon^&password=
    sleep 10
    start /D iexplore.exe /servlet/GoatConfigServlet?action=Cache^&cache_flush=Yes
    sleep 10
    taskkill /F /IM iexplore.exe

    • Dan says:

      remember to update the urls and supply the password prior to use. you can supply the password via a paramater “%1” or within the batch file

Dare to share..

%d bloggers like this: