how to clear user cache data in AX?

Question Status

Verified
Senthilkumar Sakthivel asked a question on 17 Jan 2012 3:31 AM
Reply
Verified Answer
Kent Carstens responded on 17 Jan 2012 5:36 AM

1. Stop AOS.

2. Delete the .auc file from users\\Appdata\ folder

3. Restart AOS.

community.dynamics.com/.../cleanup-cache-auc-file.aspx

Reply
James McIntosh responded on 7 Nov 2012 3:33 AM

Is it really necessary to stop the AOS?  

Is it not sufficient f the user closes their client?

Reply
Suggested Answer
André Boekestijn responded on 15 Mar 2013 1:45 AM

1. Close the client

2. The ax_{GUID}.auc file is now written to the AppData folder

3. Delete the auc file

4. Open the client

Reply
Carlos Javier Criales Cardozo responded on 21 Oct 2013 12:55 PM

Hi I have some solutions including this in www.dynamicsaxlatino.com/como-limpiar-cache-de-dynamics-ax

Reply
Carlos Javier Criales Cardozo responded on 2 Nov 2013 11:11 AM

How to clean cache of AOT and take multiple AOS changes

www.dynamicsaxlatino.com/limpiar-flush-cache-de-aos-o-aot-en-ax

Reply
B VDS responded on 4 Mar 2014 7:59 PM

We do it with the AOS still running and that seems to work fine.

Reply
Sholeh M responded on 8 Jun 2014 10:39 PM

Hi CARLOS,

Thanks a lot, its helpful for me.

Nice tricks

Reply
Camilo Alfonso Virguez serrano responded on 30 Mar 2015 8:56 AM

A Task that can be perfomed from each AOS (make sure your client is connected to each AOS)  is to use the  Tools menu, the cache submenu.  you can refrechs  elements, data and Dictionary objects.  

Reply
Suggested Answer
John Bevan responded on 27 Sep 2016 5:41 AM

Here's a PowerShell script to automate Kent Carsten's solution.

NB: Best to have AOSes off for this, as it will apply to all users / has no logic to check if users are logged on or not.

#run as administrator to avoid UAC from blocking access to user profiles (Ref: stackoverflow.com/.../39722043)

$GUID = '{*}' #NB: The GUID in the filenames comes from the database: select GLOBALGUID from SYSSQMSETTINGS.  More notes about this here: daxmusings.codecrib.com/.../fixing-code-caching-on-ax-environment.html

#if you wanted to filter for a specific environment's cache files, the best solution is to retrieve the GUID then include it in the filter.

#for simplicity / to avoid adding DB code, this script doesn't discriminate by GUID

Get-ChildItem 'C:\Users\*\AppData\Local' -Directory -Force -ErrorAction SilentlyContinue | select -expand FullName | %{

   Get-ChildItem -Path $_ -Filter "ax_GUI_$GUID*.auc" -ErrorAction SilentlyContinue | Remove-Item -Force

   Get-ChildItem -Path (Join-Path $_ 'Microsoft\Dynamics Ax\') -Filter "VSAssemblies$GUID" -Directory -ErrorAction SilentlyContinue | Remove-Item -Force

}

Reply
Verified Answer
Kent Carstens responded on 17 Jan 2012 5:36 AM

1. Stop AOS.

2. Delete the .auc file from users\\Appdata\ folder

3. Restart AOS.

community.dynamics.com/.../cleanup-cache-auc-file.aspx

Reply
Suggested Answer
André Boekestijn responded on 15 Mar 2013 1:45 AM

1. Close the client

2. The ax_{GUID}.auc file is now written to the AppData folder

3. Delete the auc file

4. Open the client

Reply
Suggested Answer
John Bevan responded on 27 Sep 2016 5:41 AM

Here's a PowerShell script to automate Kent Carsten's solution.

NB: Best to have AOSes off for this, as it will apply to all users / has no logic to check if users are logged on or not.

#run as administrator to avoid UAC from blocking access to user profiles (Ref: stackoverflow.com/.../39722043)

$GUID = '{*}' #NB: The GUID in the filenames comes from the database: select GLOBALGUID from SYSSQMSETTINGS.  More notes about this here: daxmusings.codecrib.com/.../fixing-code-caching-on-ax-environment.html

#if you wanted to filter for a specific environment's cache files, the best solution is to retrieve the GUID then include it in the filter.

#for simplicity / to avoid adding DB code, this script doesn't discriminate by GUID

Get-ChildItem 'C:\Users\*\AppData\Local' -Directory -Force -ErrorAction SilentlyContinue | select -expand FullName | %{

   Get-ChildItem -Path $_ -Filter "ax_GUI_$GUID*.auc" -ErrorAction SilentlyContinue | Remove-Item -Force

   Get-ChildItem -Path (Join-Path $_ 'Microsoft\Dynamics Ax\') -Filter "VSAssemblies$GUID" -Directory -ErrorAction SilentlyContinue | Remove-Item -Force

}

Reply