make netscape respect cache limits?
Derek Martin
derek at cerberus.ne.mediaone.net
Sun Jul 30 12:07:04 EDT 2000
Today, Ken Gosier gleaned this insight:
> Has anyone else had the problem of making netscape respect
> the cache size you give it in
> Edit|Preferences|Advanced|Cache ?
Yes, it just doesn't. If you want to limit your cache directories, set it
to zero and remove the cache directories. That's about the only way.
Another way to do it without going through netscape is to write a little
shell script to see if the cache directory is > 5M (or whatever you want)
and then delete it.
Obviously the problem with both of these methods is that you lose the
benefit (either completely or partially) of having the cache at all. If
you have a fast internet connection, this isn't a big deal, and you should
probably just turn chaching off.
An example of a shell script to do it might look something like:
------------------------------------------------------------
#!/bin/sh
cd $HOME/netscape/cache
size=`du -s . | tr -s ' ' | cut -d ' ' -f 1`
# 5M = 5000K or 5120K depending on who you ask
if [ $size -gt 5000 ]; then
cd ..
rm -R cache
fi
-----------------------------------------------------------
So just add it to cron to do it periodically (maybe once a day or so) and
you should be all set.
--
---------------------------------------------------------------
Derek D. Martin | Unix/Linux Geek
ddm at MissionCriticalLinux.com | derek at cerberus.ne.mediaone.net
---------------------------------------------------------------
-
Subcription/unsubscription/info requests: send e-mail with
"subscribe", "unsubscribe", or "info" on the first line of the
message body to discuss-request at blu.org (Subject line is ignored).
More information about the Discuss
mailing list