I'm using the Docker DevBox (Beta) from Magento for development. Unfortunately, after developing a while, it seems that the container caches everything. Sometimes it helps when I restart Docker. In the worst case, I have to initiate the Docker container again (via m2devbox-init.sh).
Developing environment details:
- macOS Sierra (10.12.3)
- Docker Community Edition (17.03.1-ce-mac5 (16048), channel stable)
- Current DevBox with Magento v. 2.1.5 (not modified)
I had the same problem with two different Magento 2 projects now, so I assume it does not depend on third party Magento modules.
In the Docker container, I can't restart php-fpm by typing "service php-fpm restart" because there seems to be no service with this name.
# sudo service --status-all [ + ] apache2 [ - ] bootlogs [ - ] bootmisc.sh [ - ] checkfs.sh [ - ] checkroot-bootclean.sh [ - ] checkroot.sh [ + ] cron [ - ] exim4 [ - ] hostname.sh [ ? ] hwclock.sh [ - ] killprocs [ - ] motd [ - ] mountall-bootclean.sh [ - ] mountall.sh [ - ] mountdevsubfs.sh [ - ] mountkernfs.sh [ - ] mountnfs-bootclean.sh [ - ] mountnfs.sh [ - ] procps [ - ] rc.local [ - ] rmnologin [ - ] rsync [ - ] sendsigs [ + ] ssh [ - ] sudo [ - ] supervisor [ + ] udev [ ? ] udev-finish [ - ] umountfs [ - ] umountnfs.sh [ - ] umountroot [ - ] urandom [ - ] x11-common
But of course, there is php-fpm running (you can see it in the active processes).
I have tried the following steps to flush the cache:
- run "bin/magento cache:flush"
- deleted static content files and cache from file system
- created a php file with "opcache_reset()" in it and run it
- killed all php-fpm processes
- flushed the cache in the Magento backend
- completely disabled the cache with "bin/magento cache:disable"
- developer mode is turned on, of course