Changing Session Mechanism to Memcache Storage

The website barely gets 1000 IPs per day, but it was painfully slow whether running on MB or tt on a dual-core 2G server with 10M bandwidth. After enabling the MySQL slow query log, it filled up over 2GB of slow queries in just a few days. It turned out most were caused by SESSION, so I switched ECSHOP's built-in SESSION to MEMCACHED.
Here's the code:
Result: Remaining Time: 0h 16m 19s

Usage: Just back up the original includes/cls_session.php file.
After the change, the website became blazing fast.

If reposting, please credit: Reposted from: Let Code Fly – PHP [http://www.wangzhibo.com/] Original article: http://www.wangzhibo.com/php/1046.html

Leave a Comment

Your email address will not be published.