30.06.2016 Views

Magento Site Performance Optimization

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Caching Them All<br />

apc.stat = 0<br />

apc.num_files_hint = 10000<br />

apc.max_file_size = 5M<br />

apc.ttl = 7200<br />

apc.user_ttl = 7200<br />

This file can be downloaded from http://mathieu-nayrolles.com/<br />

magento-optimization/chapter4/apc.ini.<br />

3. The next, and final step for the installation of APC is to configure <strong>Magento</strong><br />

to use APC. In the <strong>Magento</strong>_root/app/etc/local.xml file, in the line 57,<br />

you will find a tag named . You have to add the following line just<br />

after the tag line:<br />

<br />

apc<br />

mage_<br />

apc<br />

database<br />

0<br />

0<br />

<br />

This piece of code specifies that the cache back-end to use is apc and the file<br />

should be prefixed by the string mage_. Indeed, you might want to use the<br />

very same APC to accelerate other PHP applications hosted on your server.<br />

Therefore, files must be prefixed by their application name in order to<br />

avoid discrepancies.<br />

4. Clean the cache and session files using the following command:<br />

$ sudo rm –R magento_root/var/cache<br />

$ sudo rm -R magento_root/var/session<br />

As advised at the beginning of this section, the installation of<br />

<strong>Magento</strong> should have been triggered. The installation means that<br />

you will have to reset the time zone, currency, database address/<br />

user/passwords, credit card encryption key, and so on. However,<br />

your products and everything related to your store should not be<br />

impacted by the manipulation.<br />

[ 62 ]<br />

www.it-ebooks.info

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!