It is somewhat likely that there is no way to do this âofficiallyâ.
For example, it may or may not be a good idea just to go in and wildly rm a browserâs cache area. I mean a browser may handle the sudden disappearance of files gracefully, or it might not.
You are supposed to use the browserâs settings to clear cache and to limit the amount of disk space that the cache uses. I understand that that might not be compatible with doing it automatically or periodically in the way that you want.
Each application that uses cache would need to be considered separately e.g. what works for Firefox has no bearing on what works for Flatpak.
From the looks of it, you probably should go in and limit Firefoxâs total cache usage. Looks as if the magic config parameters are browser.cache.disk.smart_size.enabled false and browser.cache.disk.capacity to a value in KB.
Precisely because you donât have the first setting that I mentioned set.
In this case âsmartâ means âcontrolled by the browserâ rather than âcontrolled by youâ. If you set that setting to false then it will mean that the limit is âdumb and absolutely fixed and inflexibleâ i.e. it will work as you want it. It will be a hard limit rather than a guideline.