CacheMap table

dc2447

Joined: 2002-09-22
Posts: 130
Posted: Tue, 2006-04-11 18:11

Just realised that my CacheMap table is 1.4Gb - pretty amazed.

Why is this size? Seems large for an average size gallery like ours.

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Tue, 2006-04-11 19:56

lots of items, lots of users, supporting multiple languages.. all these combinations may be cached. you can tune the settings in site admin / performance.

 
dc2447

Joined: 2002-09-22
Posts: 130
Posted: Tue, 2006-04-11 20:09

Thanks but 1.4Gb of cached data? That can't be right? Can it?

Oh and the tuning seems to be

No acceleration — Medium acceleration — High acceleration

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Tue, 2006-04-11 20:29

that's all you see there? you can adjust how long cached data is saved, there is also a button to clear the cache.
1.4GB does sound like a lot.. check how many different userId/itemId combinations you have, and the average size of each entry.

 
dc2447

Joined: 2002-09-22
Posts: 130
Posted: Tue, 2006-04-11 21:20

I'm still on 2.1 rc1

 
miri

Joined: 2003-01-04
Posts: 14
Posted: Sat, 2006-08-12 00:21

My CacheMap table died some sort of horrible death last night. Now my gallery won't run at all. I had to drop the table and want to re-add it, but don't know the structure (MySQL).

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sat, 2006-08-12 06:29

see modules/core/classes/GalleryStorage.schema.tpl

CREATE TABLE DB_TABLE_PREFIXCacheMap(
 DB_COLUMN_PREFIXkey varchar(32) NOT NULL,
 DB_COLUMN_PREFIXvalue longtext,
 DB_COLUMN_PREFIXuserId int(11) NOT NULL,
 DB_COLUMN_PREFIXitemId int(11) NOT NULL,
 DB_COLUMN_PREFIXtype varchar(32) NOT NULL,
 DB_COLUMN_PREFIXtimestamp int(11) NOT NULL,
 PRIMARY KEY(DB_COLUMN_PREFIXkey, DB_COLUMN_PREFIXuserId, DB_COLUMN_PREFIXitemId, DB_COLUMN_PREFIXtype),
 INDEX DB_TABLE_PREFIXCacheMap_69068(DB_COLUMN_PREFIXuserId),
 INDEX DB_TABLE_PREFIXCacheMap_75985(DB_COLUMN_PREFIXitemId),
 INDEX DB_TABLE_PREFIXCacheMap_81545(DB_COLUMN_PREFIXtype),
 INDEX DB_TABLE_PREFIXCacheMap_24286(DB_COLUMN_PREFIXtimestamp)
) DB_TABLE_TYPE
/*!40100 DEFAULT CHARACTER SET utf8 */;

replace DB_TABLE_PREFIX with g2_ and DB_COLUMN_PREFIX with g_.

 
technobilder

Joined: 2003-02-09
Posts: 214
Posted: Sun, 2006-08-27 11:57

Mine is 1.3GB in size - I tweaked something in administration but if it helps reducing the size? I only have around 20 registered users but >112.000 pictures - so what will happen if I include G2 into my postnuke portal getting about 1500 registered users ...
Which hoster offers Terabytes of diskspace?

I have the cacheing time for guests and registered users set to 1hour but I have nearly 350.000 entrys in that table. It seems that there's no "empty cache" command after the hour and the table fills itself up.