How to auto-delete thousands of cache files?

User Help for Mozilla Thunderbird
Post Reply
pstover
Posts: 299
Joined: July 29th, 2005, 3:25 am

How to auto-delete thousands of cache files?

Post by pstover »

When I look into by profiles /cache2/entries/ folder then there are thousands of files.

I thought TB will delete them automatically after a while.
This seems not to be the case.

How can I tell TB to auto-delete them at exit resp. after 1 day?

Peter
User avatar
tanstaafl
Moderator
Posts: 49647
Joined: July 30th, 2003, 5:06 pm

Re: How to auto-delete thousands of cache files?

Post by tanstaafl »

I don't think you can as its not a mail folder. I set the disk cache in tools -> options to zero, set browser.cache.disk.enable false and rely upon it using a in-memory cache instead. I can't tell the difference.
pstover
Posts: 299
Joined: July 29th, 2005, 3:25 am

Re: How to auto-delete thousands of cache files?

Post by pstover »

Thank you
But where exactly in Tools--->Options can set the cache to 0 zero?

I check all tabs inside options but didn't found a corresponding settings
User avatar
tanstaafl
Moderator
Posts: 49647
Joined: July 30th, 2003, 5:06 pm

Re: How to auto-delete thousands of cache files?

Post by tanstaafl »

tools -> options -> advanced -> network & disk space -> disk space has a setting for the disk cache size.

However I prefer to use tools -> options -> advanced -> general -> config editor to set browser.cache.disk.capacity to 0, browser.cache.disk.enable to false , browser.cache.disk.smart_size_cached_value to 0 and browser.cache.offline.enable to false. That seems to cover more use cases. The config editor settings deleted the cache folders (not just their contents) as a side effect.

If this is too complicated you could create a two line batch file (thunderbird.bat) that you modify the target in the properties of the Thunderbird shortcut to run (instead of "C:\Program Files (x86)\Mozilla Thunderbird\thunderbird.exe") whose first line launches Thunderbird and whose second line deletes the contents of the cache in the profile.
hydrostarr
Posts: 280
Joined: October 6th, 2004, 10:21 am

Re: How to auto-delete thousands of cache files?

Post by hydrostarr »

Does all of the above still apply to Thunderbird v91.x (at least 91.5.x and 91.6.x) on macOS 10.15.7?
User avatar
tanstaafl
Moderator
Posts: 49647
Joined: July 30th, 2003, 5:06 pm

Re: How to auto-delete thousands of cache files?

Post by tanstaafl »

In the future please create a new thread rather than adding a post to a thread that is over a year old.

tools -> options is now tools -> preferences in version 91.* under Windows. I think those settings still work for disk caches. I don't bother setting them. I find it easier to check "override automatic cache management", and set "use up to X MB of space for the cache" to 0. I recently created a new profile for 91.6.0 and the only cache folder I notice is shader-cache which supposedly is used for 3D graphics. Its not mentioned by about:cache in Firefox even though it exists in my Firefox profile too. So even though its disk based they don't seem to consider it a disk cache.

I don't have a Mac so I can't say for sure what I see under Windows 10 & 11 applies to a Mac too, but I'd expect it to (other than I think your preferences menu item has a different location).
hydrostarr
Posts: 280
Joined: October 6th, 2004, 10:21 am

Re: How to auto-delete thousands of cache files?

Post by hydrostarr »

This has worked nicely so far after approx a half day's worth of testing. Thanks tanstaafl.
Post Reply