Microsoft Teams cache in a non-persistent environment

%3CLINGO-SUB%20id%3D%22lingo-sub-1385771%22%20slang%3D%22en-US%22%3EMicrosoft%20Teams%20cache%20in%20a%20non-persistent%20environment%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1385771%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20all%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMy%20name%20is%20Koen%20and%20I%20am%20working%20with%20Microsoft%20Teams%20in%20a%20Dutch%20government%20organization.%20We%20like%20to%20offer%20our%20staff%20the%26nbsp%3Bability%20to%20work%20from%20home%2C%20especially%20during%20the%20COVID-19%20crisis.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWe%20already%20have%20enrolled%20Microsoft%20Teams%20in%20our%20desktop%20(it%20came%20out%20of%20nowhere%20and%20we%20are%20replacing%20the%20default%20web-downloader%20with%20the%20MSI%20file)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EFor%20the%20record%3A%26nbsp%3BWe%20are%20using%20a%20non-persistent%20environment%20with%20VMWare%20Horizon%20Client%20and%20thin%20clients%20in%20the%20office%2C%20and%20mostly%20the%20web%20client%20when%20users%20are%20working%20from%20home.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAll%20of%20our%20users%20are%20having%20a%20profile%20where%20we%20store%20the%20temp%20files%20like%20caches%20and%20stuff.%20Also%20%25AppData%25%20is%20located%20in%20that%20profile.%20This%20data%20is%20presistent%20and%20will%20be%20availible%20on%20every%20boot%2C%20when%20they%20authenticate.%20But%2C%20we%20are%20looking%20for%20a%20way%20to%20change%20the%20Microsoft%20Teams%20cache%20location.%20We%20have%20limited%20disk%20space%20on%20the%20'profile'%20disk.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20problem%20is%2C%20that%20Microsoft%20Teams%20uses%20the%20folder%26nbsp%3B%25AppData%25%5CMicrosoft%5CTeams%5CService%20Worker%5CCacheStorage%20as%20location%20of%20some%20caching%20files.%20The%20size%20of%20the%20folder%20is%20at%20least%20200MB%2C%20and%20some%20other%20users%20are%20having%20a%20folder%20with%20at%20least%20500MB%20cache.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWe%20have%20200%2B%20users%2C%20so%20when%20I%20calculate%20this%20(%20200(users)x200(MB)%20%3A%2040.000MB%2F40GB%20for%20only%20the%20smallest%20caches.%20And%20the%20profile%20disk%20is%20only%20100GB%20(for%20example)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20is%20why%20we%20want%20to%20replace%20(or%20totally%20disable)%20the%20cache.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20already%20looked%20in%20the%20newest%20Administrative%20Templates%20(for%20Office%20365%2C%202016%20and%202019)%20and%20the%20desktop-config.json%20-%20but%20I%20can't%20find%20the%20right%20way%20to%20do%20this.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EDoes%20anyone%20know%20how%20to%20solve%20this%20issue%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1385771%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3Eadministrative%20templates%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Econfiguration%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EDeployment%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Egpo%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1426087%22%20slang%3D%22en-US%22%3ERe%3A%20Microsoft%20Teams%20cache%20in%20a%20non-persistent%20environment%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1426087%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F666016%22%20target%3D%22_blank%22%3E%40khollandervrzw%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHello.%3C%2FP%3E%3CP%3E%26nbsp%3Byou%20need%20to%20exclude%20folders%20from%20roaming%20profile%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EApplication%20Data%5CMicrosoft%5CTeams%5CApplication%20Cache%3C%2FP%3E%3CP%3EApplication%20Data%5CMicrosoft%5CTeams%5CCache%3C%2FP%3E%3CP%3EApplication%20Data%5CMicrosoft%5CTeams%5Cblob_storage%3C%2FP%3E%3CP%3EApplication%20Data%5CMicrosoft%5CTeams%5Cdatabases%3C%2FP%3E%3CP%3EApplication%20Data%5CMicrosoft%5CTeams%5CIndexeddb%3C%2FP%3E%3CP%3EApplication%20Data%5CMicrosoft%5CTeams%5CLocal%20Storage%3C%2FP%3E%3CP%3EApplication%20Data%5CMicrosoft%5CTeams%5Ctmp%3C%2FP%3E%3CP%3EApplication%20Data%5CMicrosoft%5CTeams%5CService%20Worker%5CCacheStorage%3C%2FP%3E%3CP%3EApplication%20Data%5CMicrosoft%5CTeams%5CService%20Worker%5CScriptCache%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1662086%22%20slang%3D%22en-US%22%3ERe%3A%20Microsoft%20Teams%20cache%20in%20a%20non-persistent%20environment%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1662086%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F666016%22%20target%3D%22_blank%22%3E%40khollandervrzw%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ETo%20work%20around%20the%20issue%20probably%20a%20batch%20job%20or%20a%20power%20shell%20script%20on%20logoff%2C%20as%20per%20the%20%3CA%20href%3D%22https%3A%2F%2Falbandrodsmemory.wordpress.com%2F2019%2F01%2F04%2Fmicrosoft-teams-how-to-clean-cache%2F%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Eblog%3C%2FA%3E%26nbsp%3Band%20it%20would%20also%20help%20in%20cleanup.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Falbandrodsmemory.wordpress.com%2F2019%2F01%2F04%2Fmicrosoft-teams-how-to-clean-cache%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Falbandrodsmemory.wordpress.com%2F2019%2F01%2F04%2Fmicrosoft-teams-how-to-clean-cache%2F%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%2C%3C%2FP%3E%3CP%3EJagz%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2059013%22%20slang%3D%22en-US%22%3ERe%3A%20Microsoft%20Teams%20cache%20in%20a%20non-persistent%20environment%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2059013%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F683226%22%20target%3D%22_blank%22%3E%40oleksiiboldyriev%3C%2FA%3E%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F666016%22%20target%3D%22_blank%22%3E%40khollandervrzw%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%20%26nbsp%3B%20Did%20excluding%26nbsp%3Ball%20of%20these%20cache%20folders%20work%20for%20you%2C%20how%20was%20performance%20after%20the%20changes%3F%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Visitor

Hi all,

 

My name is Koen and I am working with Microsoft Teams in a Dutch government organization. We like to offer our staff the ability to work from home, especially during the COVID-19 crisis. 

 

We already have enrolled Microsoft Teams in our desktop (it came out of nowhere and we are replacing the default web-downloader with the MSI file)

 

For the record: We are using a non-persistent environment with VMWare Horizon Client and thin clients in the office, and mostly the web client when users are working from home.

 

All of our users are having a profile where we store the temp files like caches and stuff. Also %AppData% is located in that profile. This data is presistent and will be availible on every boot, when they authenticate. But, we are looking for a way to change the Microsoft Teams cache location. We have limited disk space on the 'profile' disk. 

 

The problem is, that Microsoft Teams uses the folder %AppData%\Microsoft\Teams\Service Worker\CacheStorage as location of some caching files. The size of the folder is at least 200MB, and some other users are having a folder with at least 500MB cache. 

 

We have 200+ users, so when I calculate this ( 200(users)x200(MB) : 40.000MB/40GB for only the smallest caches. And the profile disk is only 100GB (for example)

 

This is why we want to replace (or totally disable) the cache.

 

I already looked in the newest Administrative Templates (for Office 365, 2016 and 2019) and the desktop-config.json - but I can't find the right way to do this.

 

Does anyone know how to solve this issue?

3 Replies

@khollandervrzw 

Hello.

 you need to exclude folders from roaming profile:

 

Application Data\Microsoft\Teams\Application Cache

Application Data\Microsoft\Teams\Cache

Application Data\Microsoft\Teams\blob_storage

Application Data\Microsoft\Teams\databases

Application Data\Microsoft\Teams\Indexeddb

Application Data\Microsoft\Teams\Local Storage

Application Data\Microsoft\Teams\tmp

Application Data\Microsoft\Teams\Service Worker\CacheStorage

Application Data\Microsoft\Teams\Service Worker\ScriptCache

@khollandervrzw 

 

To work around the issue probably a batch job or a power shell script on logoff, as per the blog and it would also help in cleanup.

 

 https://albandrodsmemory.wordpress.com/2019/01/04/microsoft-teams-how-to-clean-cache/

 

Thanks,

Jagz

@oleksiiboldyriev @khollandervrzw    Did excluding all of these cache folders work for you, how was performance after the changes?