tags:

views:

50

answers:

1

Hello,

Is it possible to have two different memcached server to separate admin sessions of the frontend sessions in magento ?

It is actually possible to separate sessions and file cache, but it applies on both admin and frontend, which dissallow to clear, for example, only admin sessions. If you want to clear admin sessions, you have to clear all sessions : admin and frontend.

Thanks,

Hugues.

A: 

Looking at my own sessions, I have a frontend session cookie as well as an admin one. The database confirms that these are in fact separate at least in their database storage. This would lead me to believe that you could hack the session retrieval from the database to use a specified memcached server, including the split that you specified it.

As far as clearing sessions, you'd have to go into the code to try to clear only a customer or admin session.

Hope that helps!

Thanks, Joe

Joseph Mastey
I may have been not really clear. Actually all sessions are stored on a memcache server. If I restart my memcache, customers on the frontend and admins on the backend, all loose their session, they are disconnected. I would like to be able to store all backend sessions, on another memcache server, not on the same as frontend session. This would allow me to, sometime, for different reasons, restart my memcache server which only store admin sessions. :)
Hugues ALARY
Sure, my point was more that the sessions are not interleaved, so you should be able to hack the model that starts the session to point it at whichever memcached server you want, depending on the session that is requesting initialization. It's not going to be totally clean, but it's doable.
Joseph Mastey
in fact, I would have think that it may have already been implemented in magento and it would have been activable throught the local.xml file. As a matter of fact, in local.xml, we can specify 2 different memcache server : one for file caching, and one other for session storing. Now, it would be great to be able to specify one server for file chacing, one for frontend session storing, and one for admin session storing. But i think I'm going to have to implement that myself ;)
Hugues ALARY