Derivative cache = HUGE

TopCat99

Joined: 2004-04-09
Posts: 7
Posted: Tue, 2005-10-18 19:36

Well, I managed to get G2 up and running. Have a few quirks to look into (like the item count being about 4000 more than G1), but overall I'm pleased.

I figured it was time to clean up the migration mess and free up some disk space. That's when I noticed this little gem: the public_html/gallery/g2data/cache/derivative directory is 1.2 GIGS in size! I'm on a shared host. You can see where this could be a problem ;)

I tried "Optimize database" and the two cache deletes in Site Admin to no avail. How do I clean up this cache--or can I?


Gallery version = 2.0 core 1.0.0
PHP version = 4.3.11 apache
Webserver = Apache/1.3.33 (Unix)
Database = mysql 4.1.13-standard
Toolkits = Exif, NetPBM, SquareThumb, Thumbnail, Gd, ImageMagick
Operating system = Linux

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Tue, 2005-10-18 20:59

well, you don't want to delete this derivative cache. really, you don't want to :)
despite its name "cache", the derivative cache is the place on the harddisk, where G2 stores thumbnails and resizes.
so if you delete this cache/derivatives/ folder, G2 has to regenerate the thumbnails and resizes again (very CPU intensive, the webserver will be very slow). and after a little browsing, the folder will have the same size as before.

the only way to spend less harddisk space for thumbnails and resizes is to choose less resize sizes (maybe you have more than one defined) and / or to choose smaller thumbnail / resize dimensions.

 
fryfrog

Joined: 2002-10-30
Posts: 3236
Posted: Wed, 2005-10-19 04:13

You can also limit the size of your originals to save some space also too.

Signature: Like Gallery? Appreciate my help? Think I'm an asshole? Make your point by donating to the Gallery project! Or maybe just visit my website.