Date Published: February 6, 2025
Clearing PHP Apcu cache on Acquia Cloud
Issue¶
I need to clear APCu cache.
Resolution¶
First, try drush cr
to rebuild all the caches. It's rare that you actually need to clear APCu cache separately.
APCu is a very small cache, usually 32M, and it's just for the PHP Caches that were previously a part of APC, and are now User Cache see https://www.php.net/manual/en/book.apcu.php for more information.
Each time, you will need to specify the instance to load on each request by adding a ah_app_server=ded-20746
or ah_app_server=ded-20747
cookie.
Example code of the PHP apcu_clear_cache()
script
<?php
echo "APC-User cache: " . apcu_clear_cache ( ). "\n";
This function always returns true. It's a little confusing.
This can also be helpful to monitor and tune APCu cache: https://anavarre.net/how-to-monitor-and-tune-apcu/
Did not find what you were looking for?
If this content did not answer your questions, try searching or contacting our support team for further assistance.