In one of our project website started loading very slow and I found out all caches were disabled which I have enabled earlier.
I can figure out the following ways through which caches can get disabled:
- When someone runs
php bin/magento cache:disablecommand.
- When someone modifies
app/etc/env.phpand disables caches from there.
- Under certain circumstances a file .regenerate is written in the var folder (either at setup upgrade or composer install / upgrade) and if that file is present when running
php bin/magento setup:di:compilethe cache is disabled and re-enabled when the compilation process is finished. For some reason, sometimes the cache is not re-enabled. (Referenced from here)
What are the other possibilities through which
- Someone having code/db access can disable it ?
- Automatically it can get disabled ?