# Using APC or OPcache with PrestaShop

> Find out how APC and OPcache speed up PrestaShop by caching compiled PHP code, and how to use OPcache with your store.

Source: https://helpcenter.ruachost.com/apps/prestashop/using-apc-or-opcache-with-prestashop/

**APC (Alternative PHP Cache)** and **OPcache** are PHP opcode caching systems that improve performance by storing precompiled PHP code in memory. This allows your PrestaShop store to serve pages faster and reduce server load. On **ruachost.com**, both APC and OPcache are supported depending on your PHP version and hosting plan.

## Why Use APC or OPcache?

- Speeds up page rendering by avoiding repeated PHP compilation.
- Reduces CPU usage and improves scalability.
- Enhances customer experience with faster load times.

## About APC and OPcache

- **APC** → Works with PHP 5.4 and earlier. It is a separate extension that may or may not be installed on your server.
- **OPcache** → Built into PHP 5.5 and newer. It is a drop‑in replacement for APC and does not require separate installation.

## Using APC or OPcache with PrestaShop

1. Ensure APC or OPcache is installed on your server:

   - On **Ruachost Managed VPS** accounts, OPcache is enabled by default.
   - APC may be available on legacy PHP versions.
2. No special configuration is required in PrestaShop.

   - APC and OPcache work at the **web server level**.
   - PrestaShop automatically benefits from the performance improvements.
3. To verify:

   - Check your PHP settings in **cPanel → PHP Info**.
   - Look for `APC` or `Zend OPcache` sections.

## Important Notes

- Use OPcache if you are running PHP 5.5 or newer.
- APC is deprecated and should only be used on older PHP versions.
- Always clear the **Smarty cache** after enabling or changing caching systems.
- For more details, see the official PHP OPcache [Documentation](https://php.net/manual/en/book.opcache.php)
