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:disable
command. - When someone modifies
app/etc/env.php
and 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:compile
the 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 ?