I'm starting to learn about using Memcached with PHP and I was wondering; is there a point at which you should start using it? Is it always more efficient to cache data or does it only become effective once your site gets a certain number of hits? Presumably there is an overhead associated with Memcached, so when does the speed benefit outweigh this?
Thanks in advance for any advice.
You should start using memcached when not using it starts to affect your site / server.
So when you just have 100 visitors a day and your site still responds quickly, don't bother using it.
But when you have running times somewhere near 200ms or more per page, and the site feels slow too, you should look out for the bottlenecks using some PHP profiler (XDebug integrates one that you can use in combination with WinCacheGrind or KCacheGrind). Especially caching database requests should save you some load time.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With