Hello Rahul, how are you doing?
Thanks for your attention! Would you mind give me your opinion about something?
There's a featured box that can't get cached. So, I configured it manually to bypass cache and stay dynamic (code is executed on every page load). The WP Super Cache FAQ explains that in "How do I make certain parts of the page stay dynamic?" section.
So, most part of the entire page is executed using HTML and a specific part (a featured bar box) uses a PHP/MySQL.
The code that runs on every page load are some simple to select some data from my database and some $fetch and to print the results in the webpage, of course. But instead of everytime calling database to get this results, it would be much better to cache this results. So, I have two options:
1) Activate query_cache in my.cnf. However, this will only cache MySQL and don't PHP. :(
2) Activate memcache (or APC, I don't know much about it's difference). I think this is the more valid option that I have to do in order to improve my performance.
After all my explanations, here's the final question: I'd like to know if installing memcache in my server is enought to get it working imediatally or I have to make any changes in my code to adapt it with memcache; I'd like to know if it will really help me with both PHP and MySQL for this specific part of code I have to cache or it's results is similar to enabling query_cache? Or is using APC rather than memcache better in my case?