300.000 pics to upgrade - is it safe to better empty all caches before upgrading?

technobilder

Joined: 2003-02-09
Posts: 214
Posted: Sat, 2008-12-13 14:28

As my Gallery now hosts nearly 300.000 pictures I think that might cause problems when upgrading.
I noticed that the cache dirs in g2data are really huge (not only large).

So can anyone tell me if its save to delete the caches before upgrading. (There are old files from 2004, and sure over a million files all together).

Is G2.3 coming with an improved cache managment ? Or can I manually empty those cache dirs safely from time to time?

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Sat, 2008-12-13 15:42

In theory you can delete anything in g2data/cache at any time. However ... /cache/derivative holds the thumbnails, resizes etc, and some servers will overload if they're forced to rebuild them en-masse on-the-fly (thread and memory limitations on the server etc) and once a lot of derivatives fail to rebuild and are marked as 'broken' it can be hard to recover them. So I would leave that folder intact.

A million cache files for 300k images is to be expected: each resize, each thumbnail and each watermarked-version of each image generates two or more files.

The cache management in 2.3 is as far as I know unchanged.

I don't think that there's any benefit in deleting any of the cache contents specifically before upgrading. I shall wait to hear if anyone disagrees.