FYI : http://pecl.php.net/package/memcached
BTW , memcached server is not written in PHP . In fact , it seems no cache server is implemented in PHP. Cache server behaves as a standalone process in the system, which is almost impossible to write in PHP code.
PECL only provides a client library to connect to memcached server.

Anyway , no matter what cache solution being incorporated , please just add one cache layer atop the db layer.

No matter memcached or other solutions are OK. Please just don't directly call DB in each request.

If no caching server specified in the config , then call DB directly.


English is not my native language. I try my best to express my thought precisely. I hope you understand what I mean. If any misunderstanding results from culture gaps, I apologize first.