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?
exo-open --launch WebBrowser --disk-cache-size=52428800
# or do you need to replace this
exo-open --launch WebBrowser
# with this
chromium-browser %U --disk-cache-size=52428800
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
# or
chrome://net-internals/#httpCache page
https://i.imgur.com/DDTrlpF.png
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
...
CHROMIUM_FLAGS="--disk-cache-size=52428800"
...
# OR
# assumes we want additional flags such as disk-cache-dir
# note the example below puts chromium's cache folder on your Desktop... not ideal!
...
CHROMIUM_FLAGS="--disk-cache-size=52428800 --disk-cache-dir=$HOME/Desktop/chromium-cache"
...
(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:
Code:
chrome://net-internals/#httpCache
# or
chrome://net-internals/#httpCache page
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
...
tmpfs /home/ralphy/.cache/chromium tmpfs noatime,nodev,nosuid,size=55M 0 0
...
... 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.
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...um-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
(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:
Code:
/home/user_name/.cache/chromium/Default
That's right. Running in terminal something like:
Code:
du -sh /home/$USER/.cache/chromium/
... will return human readable size for that cache folder.