Will APC work well for a highly dynamic PHP site?

This may be a trivial question for some, but I have not yet been able to find the answer.

If I understand correctly, APC does two things. Store PHP pages in byte code for faster delivery. It can also cache data so we can request it faster.

I'm interested in the byte code function, which, if I understand correctly, comes by default. I will not need to modify my code much to make this work.

My question is this: our site is a social networking site, and our PHP pages are very dynamic. Each time they are invoked, they are influenced by many factors.

Could we use APC?

Thanks Haluk

+3
source share
2 answers

Yes, this is exactly the situation with which APC works great (although it benefits all types of pages). This is essentially a "compiler" for PHP code.

If the PHP code does not change more often than the page loads (I don’t think it will ever happen), APC will benefit you.

For any static pages (or static parts of pages), you might want to look at the caching of output to files on the system. Thus, when you need to display this component, instead of running PHP code, you can simply serve the cached HTML code.

+3
source

It will not work so well for the dynamic parts of your site if you do not cache them separately, but you will benefit from the bytecode cache without any changes to your code.

+1

Source: https://habr.com/ru/post/1775418/


All Articles