Author Topic: Konqueror Cache Issue  (Read 1791 times)

Fritzy

  • Newbie
  • *
  • Posts: 2
    • View Profile
Konqueror Cache Issue
« on: December 14, 2004, 06:56:40 pm »
This Topic starts off talking about my problem.  Basically Konqueror-Embedded on OZ 3.5.2 writes cache to /, and quickly fills it up and crashes.

Messing with environment variables, /root/.kde/share/config/konq-embedrc, etc.  No amount of turning off caching, minimizing allowable caching siz, etc, works.  I've even tried symlinking to a /home/zaurus/.kde directory

The above post doesn't touch the issue, and instead goes on a tangent about Opera.

Konqueror's Konq-embedded FAQ site says that file caching is turned off by default, and showed me the environment variables that effect it, but I can't get anything to work.  Even setting the caching directory to my SD card has no effect.  I assume it's a compiled in option that's doing all this.

Has anyone had success with this?  Does anyone have any additional ideas?  Please don't suggest another browser.

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
Konqueror Cache Issue
« Reply #1 on: December 15, 2004, 05:57:23 am »
Quote
I've even tried symlinking to a /home/zaurus/.kde directory

Where is the cache stored? Could you create a symlink to place this in /tmp (which is a RAM based fs iirc) or on a storage card?


Si
C750 OZ3.5.4 (GPE, 2.6.x kernel)
SL5500 OZ3.5.4 (Opie)
Nokia 770
Serial GPS, WCF-12, Socket Ethernet & BT, Ratoc USB
WinXP, Mandriva

BeKind

  • Jr. Member
  • **
  • Posts: 68
    • View Profile
    • http://www.seizurerobots.com
Konqueror Cache Issue
« Reply #2 on: December 15, 2004, 06:03:39 am »
It puts the cache in a bunch of directories in / with names of letters (a b c ...).

Fritzy

  • Newbie
  • *
  • Posts: 2
    • View Profile
Konqueror Cache Issue
« Reply #3 on: December 15, 2004, 12:32:39 pm »
I suppose I could symlink all the alpha chars in / to a better place... but still, it's very wasteful to use cache on a flash device, because flash can only be written to so many times.

The problem may be unsolvable.  I suspect it's a compiled in option that's set wrong.
I'm having a hard time figuring out who to contact on the issue and have them fix it.  Any ideas?
« Last Edit: December 15, 2004, 12:32:58 pm by Fritzy »

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
Konqueror Cache Issue
« Reply #4 on: December 15, 2004, 12:41:40 pm »
Look at the code in OE and come up with a patch, or submit a bug about it.


Si
C750 OZ3.5.4 (GPE, 2.6.x kernel)
SL5500 OZ3.5.4 (Opie)
Nokia 770
Serial GPS, WCF-12, Socket Ethernet & BT, Ratoc USB
WinXP, Mandriva

radioz

  • Full Member
  • ***
  • Posts: 102
    • View Profile
Konqueror Cache Issue
« Reply #5 on: February 02, 2005, 09:57:23 pm »
Anyone found a fix for this? I don't like having all of the cache directories polluting the root filesystem!

radioz
5600 PXA-255
Hentges OZ 3.5.4.2
PQI 1G SD
PQI 256M SD
Socket LP 10/100 Ethernet
Ambicom WL1100C Wifi

samac

  • Full Member
  • ***
  • Posts: 124
    • View Profile
Konqueror Cache Issue
« Reply #6 on: February 03, 2005, 04:27:35 am »
How about writing a script that sym links all of the a,b,c's... to your SD card then deletes all the directories at the end of the embedded-konqueror session.

I suggest this because that is what I thought of, though haven't done yet, and with my coding skills it would probably be 104 lines long as a minimum, but I am sure some one could come up with a killer one liner.

Samac
Zaurus SL5500
Hentges 1.0.x
64mb CF card
256mb SD card
Pocket-top Keyboard
Slackware 11.0 (2.6.17.13)

systemparadox

  • Full Member
  • ***
  • Posts: 211
    • View Profile
    • http://www.systemparadox.co.uk
Konqueror Cache Issue
« Reply #7 on: February 03, 2005, 12:22:43 pm »
Quote
but still, it's very wasteful to use cache on a flash device, because flash can only be written to so many times.
Excuse me!? Please tell me you are joking. The amount my root gets written to it will be dead real soon if this is the case. I hope this doesn't apply to other things like sd, cf, ram too.

Quote
How about writing a script that sym links all of the a,b,c's... to your SD card then deletes all the directories at the end of the embedded-konqueror session.
Why do the directories need deleting? Which ones are you referring to anyway?

I just symlinked all the 0, a, b, c, etc dirs to dirs in a 'cache' dir on my sd. This seems to have worked.

Code: [Select]
cachedir=/mnt/card/.cache
for dir in 0 a b c d e f g h i j k l m n o p q r s t u v w x y z; do
mkdir -p $cachedir/$dir
ln -s $cachedir/$dir /$dir
done
I think that would work. Let me know if there are any other cache dirs.
These links are however _VERY_ annoying if you use the console and tab completion lots- a real fix would be great, but for the moment...

Hope this is of some use
Simon
My Site: The System Paradox (http://www.systemparadox.co.uk)

FOR SALE: Zaurus SL-C750: /Symbol Spectrum24 CF WiFi/Pilot Pentopia extending stylus (worth every penny)/Currently running Cacko.

systemparadox

  • Full Member
  • ***
  • Posts: 211
    • View Profile
    • http://www.systemparadox.co.uk
Konqueror Cache Issue
« Reply #8 on: February 03, 2005, 12:29:15 pm »
durr... think i just got what samac meant. that would certainly get rid of the annoying links when you aren't running konqueror.

How about changing the konqueror.desktop file to run this...

Code: [Select]
#!/bin/sh
cachedir=/mnt/card/.cache
for dir in 0 a b c d e f g h i j k l m n o p q r s t u v w x y z; do
mkdir -p $cachedir/$dir
ln -s $cachedir/$dir /$dir
done
/opt/QtPalmtop/bin/konqueror
for link in 0 a b c d e f g h i j k l m n o p q r s t u v w x y z; do
rm /$link
done
My Site: The System Paradox (http://www.systemparadox.co.uk)

FOR SALE: Zaurus SL-C750: /Symbol Spectrum24 CF WiFi/Pilot Pentopia extending stylus (worth every penny)/Currently running Cacko.

samac

  • Full Member
  • ***
  • Posts: 124
    • View Profile
Konqueror Cache Issue
« Reply #9 on: February 03, 2005, 02:38:15 pm »
Code: [Select]
#!/bin/sh
cachedir=/mnt/card/.cache
for dir in 0 a b c d e f g h i j k l m n o p q r s t u v w x y z; do
mkdir -p $cachedir/$dir
ln -s $cachedir/$dir /$dir
done
/opt/QtPalmtop/bin/konqueror
for link in 0 a b c d e f g h i j k l m n o p q r s t u v w x y z; do
rm /$link
done

OK so you can do it in 10 lines, but I said I was rubbish at coding, any chance of some some #comments, so that I can understand it fully.

I think explanatory notes aimed at the average three year old would be about the right level.

Many thanks

samac
« Last Edit: February 03, 2005, 02:38:44 pm by samac »
Zaurus SL5500
Hentges 1.0.x
64mb CF card
256mb SD card
Pocket-top Keyboard
Slackware 11.0 (2.6.17.13)

systemparadox

  • Full Member
  • ***
  • Posts: 211
    • View Profile
    • http://www.systemparadox.co.uk
Konqueror Cache Issue
« Reply #10 on: February 03, 2005, 03:51:16 pm »
Code: [Select]
#!/bin/sh
# change this to the dir you want cache to be stored
cachedir=/mnt/card/.cache
# change the 'dir' variable to '0', run the commands up to 'done',
# then change the 'dir' variable to 'a' and run the commands again,
# repeat until ';' is encountered.
for dir in 0 a b c d e f g h i j k l m n o p q r s t u v w x y z; do
# -p = make all parent dirs (if they don't already exist).
# $something means variable 'something'
# so for first run the command would become:
# mkdir -p /mnt/card/.cache/0
mkdir -p $cachedir/$dir
# -s = make symbolic link
# make a link to $cachedir/$dir from / called $dir
ln -s $cachedir/$dir /$dir
done
# run konqueror
/opt/QtPalmtop/bin/konqueror
# remove all those links (now that konqueror has closed)
# change the 'link' variable to '0', then run 'rm /0',
# then change 'link' to 'a', run 'rm /a', and so on...
for link in 0 a b c d e f g h i j k l m n o p q r s t u v w x y z; do
rm /$link
done

How's that?

this has not been tested btw. a few notes:
1. If konqueror forks into the background this script will be useless (untested).
2. This script does not delete the cache- it just gets rid of those links. I think this is probably a good idea, but if you want more space on your sd check the .cache dir.
3. To modify the script to delete the cache as well, add the line 'rm -rf $cachedir' to the end.

that will all fit on one line btw (using ;'s which could be classed as cheating), though it could probably be made more efficient.
« Last Edit: February 03, 2005, 03:53:07 pm by systemparadox »
My Site: The System Paradox (http://www.systemparadox.co.uk)

FOR SALE: Zaurus SL-C750: /Symbol Spectrum24 CF WiFi/Pilot Pentopia extending stylus (worth every penny)/Currently running Cacko.