Monday, September 21, 2009

Memcached

If your not using memcached means your site don't have high traffic but i started memcache for 2 reasons.
1. Query Optimizations
2. On server load balancing store sessions in memcache

Memcached Link: http://in.php.net/memcache

Memcache stores the cache in memory but its not very relabel if crash the chances of data will lost.So when i store sessions in memcache also maintained sessions in database if suppose memcache server crash next time data get from database.

But for query optimizations memcache is best.
You can cached quires even php class objects.
In our framework we have model class so what i do i am adding the model class object in memcached.
The data which i am caching the memcache server which is not frequently changes like site categories, country, state.

Facebook also using memcache and they have also hack the memcache system for relability.

No comments:

Post a Comment