Using memcache as assession storage for multiple sites
I have a server hosting one that stores sessions in memcached.
I want to host a second one and I am thinking if there is going to be a problem if I use the same memcached server t开发者_开发技巧o store the sessions of this 2nd site as well.
Am I going to have conflicts with the session ids? Is it possible that the session id generated for one site matches one generated for the other?
Thanks
Yes, it is possible that your IDs clash, e.g. in tomcat the session id is only unique in one context. But if you're setting and getting the sessionID from memcache yourself, you could easily add a prefix to the IDs. Or if this is a module of some kind, it may be configurable to use prefixes.
精彩评论