ANS Documentation

Improve This Doc
  • Cloud
  • Domains and DNS management
  • Backup and High Availability
  • eCommerce Stacks
    • Magento
    • Shopware
      • Adding Domain(s) To The Stack
      • PHP
      • OPCache
      • APCu
      • Redis
      • Varnish
    • WooCommerce
    • AeroCommerce
  • Security
  • Email
  • Monitoring and usage management
  • Networking
  • Operating systems
  • Webcelerator
  • MyUKFast
  • Home >
  • eCommerce Stacks >
  • Shopware >
  • APCu >
  • APCu

APCu¶

Version Check¶

You can check the version of APCu installed with the command:

~]# rpm -qa | grep -i apcu
php-pecl-apcu-5.1.17-1.el7.remi.7.2.x86_64

Module Check¶

You can confirm the module has been loaded:

~]# php -m | grep -i APCu
apcu

Flush APCu¶

Service Reload¶

You can flush APCu with a reload of the PHP-FPM service, always run a configuration test before reloading

~]# php-fpm -t
[19-Aug-2019 08:48:54] NOTICE: configuration file /etc/php-fpm.conf test is successful
~]# systemctl reload php-fpm

PHP Function¶

You can also clear APCu using the PHP function:

<?php
 if (extension_loaded('apcu')) {
    echo "APCu cache: " . apcu_clear_cache() . "\n";
 }
?>

APCu settings¶

We use the following sed to change the default settings of APCu on our Shopware stacks:

sed -i 's/;apc.shm_size=32M/apc.shm_size=512M/g' /etc/php.d/*apcu.ini

Next Article > Redis

  • Useful Links
  • SMB
  • Enterprise
  • Channel
  • Public Sector
  • ANS Data Centres
  • About ANS
  • Careers
  • Blog
  • Get in touch
  •  
  • Sales 0800 458 4545
  • Support 0800 230 0032
  • Get in touch

© ANS Group Limited | Terms and Conditions | Corporate Guidance | Sitemap
ANS Group Limited, registered in England and Wales, company registration number 03176761, registered office 1 Archway, Birley Fields, Manchester M15 5QJ