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 time()-3*60. But it was very slow because of that gc is running very rarely, and there are too many files to check (my website has up to 30000 uniq visits per day). So, another idea is to have database driven sessions, and counting records modified not longer than 3 minutes ago by sql query. 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. What do you think, is it going to slow down my website? Do you have better ideas on how to implement online counter? Thx, Pillow --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---