Caching method compared
By Rayed
I tested different types of caching, here is my times:
Method | Hit Time | Improvments over Miss |
---|---|---|
File | 0.00029 | 19337.93% |
MySQL | 0.00064 | 8762.50% |
memcached | 0.00103 | 5444.66% |
Altought File caching is much faster that the other two methods, it can suffer from file locking problems, and can’t be shared between more than one server.
memcached client used is written in PHP which will slow it down a little bit.
So MySQL seems the ideal choice π