Re: Efficiency of database driven sessions

2007-08-15 Thread Martin Schapendonk
2007/8/14, Pillow <[EMAIL PROTECTED]>: > However, it also have disadvantages - each $this -> Session -> read/ > write(); equals one database query. I use sessions very often, so > number of queries to database on every request has risen rapidly. Just give it a try. 30.000 sessions a day shouldn't

Re: Efficiency of database driven sessions

2007-08-14 Thread Marcus
I've set up a MEMORY table in my MySQL database with following columns: user_id INT UNSIGNED, lastactivity DATETIME, position VARCHAR(255) In AppController for every user which is logged in I do a SQL REPLACE into this table on every request. Because this is table is kept in the RAM of the datab

Efficiency of database driven sessions

2007-08-14 Thread Pillow
Hi, I'm going to implement some online users counter on my website. The simplest way of doing it is counting sessions active for instance for last 3 minutes. I've tried using CAKE_SESSION_SAVE set to cake, and counting files in / app/tmp/sessions/ which last modification time was greater than ti