Magento DevDocs recommends to use APCu. I have enabled it and it works somehow, but I don’t why and, and when to do what. I use already apc.php. Can anyone share some knowledge regarding APCu and Magento usage? I just would like to get a basic grasp, althoug I know not all is directly related to Magento…
- Is it only used by composer and its class loading? Does Magento use it directly?
- When does the cache get populated? It seems that
composer dumb-autoload -o --apcugenerates (just) 3 entries, loading a frontend page generates hundreds more (unfortunately not always – don’t know what I’m doing wrong).
- What happens after I’ve cleared the cache? E.g. with the button in apc.php. Do have I to re-populate the cache?
- What clears the cache indirectly? E.g. a php-fpm restart? Is it a problem if the cache gets cleared?
- If I’d like to update the autoloader, DevDocs tells to do
composer install --no-dev bin/magento setup:di:compile composer dump-autoload -o bin/magento setup:static-content:deploy
composer installif Magento is already installed? And what is with the parameters of composer:
--apcu-autoloader? Why don’t they get used?
- When do I have to what regarding APCu? When do I have to pay attention? E.g. "always do … when you do …".
- I observed that stored keys are prefixed with a random string. What does create that string or when does it get altered or renewed?
- Do I have to keep anything in mind if I also use OpCache, Redis or anything else?
- Can you recommend APCu as well? Can it be that is offers just a minimal improvement?
I appreciate any enlightment! I hope using APCu with Magento is more easy then I think.