![]() |
How to limit Chromium browser's cache size - Printable Version +- Linux Lite Forums (https://www.linuxliteos.com/forums) +-- Forum: Software - Support (https://www.linuxliteos.com/forums/forumdisplay.php?fid=5) +--- Forum: Other (https://www.linuxliteos.com/forums/forumdisplay.php?fid=20) +--- Thread: How to limit Chromium browser's cache size (/showthread.php?tid=5061) |
How to limit Chromium browser's cache size - Lex24 - 03-05-2018 I would like to limit the cache size in Chromium browser to 50 MB (52428800 bytes). Apparently you need to add the following parameter to the startup command: Code: --disk-cache-size=52428800 1) Do you need to edit the command separately in the following two places, or can this somehow be done globally? Chromium is already set to Preferred Web Browser in Settings - Preferred Applications. Alacarte Menu Editor Code: chromium-browser %U --disk-cache-size=52428800 Settings - Keyboard - Application Shortcuts Code: # is this ok? Does %U URL parameter need to be appended to the startup command in both Alacarte and Application Shortcuts? 2) Typing the following address in Chromium's address bar used to show the page with all kinds of statistics (including the new cache size limit), but all what I can get in Chromium v64 is mostly a blank page, so it is impossible to verify that the new size limit is in place: Code: chrome://net-internals/#httpCache https://i.imgur.com/DDTrlpF.png Re: How to limit Chromium browser's cache size - ralphy - 03-05-2018 To do it globally in the system, do not touch any of the launchers you mentioned above. Instead edit /etc/chromium-browser/default Pass the arguments you want so that every instance executed in the system carries those arguments. e.g.: Code: sudo nano /etc/chromium-browser/default Code: # file /etc/chromium-browser/default Re: How to limit Chromium browser's cache size - ralphy - 03-05-2018 (03-05-2018, 09:52 AM)Lex24 link Wrote: Typing the following address in Chromium's address bar used to show the page with all kinds of statistics (including the new cache size limit), but all what I can get in Chromium v64 is mostly a blank page, so it is impossible to verify that the new size limit is in place: I do not have an answer for this. You actually reminded me to research the subject. Ever since the more advanced "Simple Cache" was implemented I don't know how to see the dir-cache-size in Chromium from within the browser. What I did at the time back then was to set a very small disk-cache-size=5MB and a temp dir-cache-size, browsed the web for a little while and then check the size of the dir-cache-size. Not optimal at all. Since I happen to be the only user in my computer, I use tmpfs with a 55MB limit for my browsing anyways (I set the disk-cache-size flag in chromium too obviously): Code: sudo nano /etc/fstab ... which keeps my cache dir in check anyways and in memory too. Irrespective, chromium's disk_cache_size flag works and it is applied as expected. I just don't know how to check it in the browser itself anymore. Re: How to limit Chromium browser's cache size - Lex24 - 03-09-2018 Thanks for your help and for the tip about tmpfs. I have set the flag in /etc/chromium-browser/default. The best place to ask about net-internals command seems to be Chromium-discuss, but I would need to create a Google account, I'll put it on to-do-later list: https://groups.google.com/a/chromium.org/forum/#!forum/chromium-discuss I assume that the low-tech solution to verify the cache size would be to check the size of the following folder: Code: /home/user_name/.cache/chromium/Default Re: How to limit Chromium browser's cache size - ralphy - 03-09-2018 (03-09-2018, 12:45 PM)Lex24 link Wrote: I assume that the low-tech solution to verify the cache size would be to check the size of the following folder: That's right. Running in terminal something like: Code: du -sh /home/$USER/.cache/chromium/ ... will return human readable size for that cache folder. ![]() |