Jump to content

session variables - memcache vs. database


mottwsc

Recommended Posts

I have different operations spread across multiple servers for a LAMP application.  I need a way for session data to be accessed across these multiple servers.  Using a database table to store session data was the first thought, but then someone suggested using memcache/memcached because it will be cleaner (since it is self-cleaning).  I want to use PHP's built-in session handling, but want to direct it elsewhere in terms of where it is stored.

 

I have two questions:

 

Is there a strightforward example which shows how to use PHP's built-in session handling but with the use of memcache?

 

Is there any reason I would use a database table instead of memcache?

 

Thanks!

Link to comment
https://forums.phpfreaks.com/topic/194899-session-variables-memcache-vs-database/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.