Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

active APC in php

Tags:

php

apache

apc

I have installed APC PHP in my server. PHPinfo is showing it. But just got a question as I am a bit confused...

will new PHP requests coming to the server will start using APC automatically or does php codes also need to be modified to make use of APC ? Can you please provide some clues.

Thanks

like image 961
Sangfroid Avatar asked Dec 20 '12 01:12

Sangfroid


2 Answers

PHP will use it automatically. You don't have to change your code at all to use a caching accelerator.

like image 140
staticsan Avatar answered Oct 30 '22 02:10

staticsan


APC is running automaticly. The module run your code and convert it to bytecode. When you call your script again your webserver don't run the script again instead its executing the bytecode.

If you have a lot of traffic it save a lot of performance.

Second function is that you can save values in the shared memory from APC if you want. For this you should read the documentation.

http://php.net/manual/de/book.apc.php

like image 25
René Höhle Avatar answered Oct 30 '22 02:10

René Höhle