Disabling apcu and opcache for local development? #237
-
Hello, Thank you! 🙂 |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Thanks a lot for this, I couldn't understand why the code was updating in the container but the changes were not reflected in the browser. I don't if there's another way to disable the cache though. |
Beta Was this translation helpful? Give feedback.
-
You can try disabling the opcache via environment variables or via php-ini-overrides.ini. Try putting this into your docker-compose file, in the PHP section: environment:
PHP_OPCACHE_VALIDATE_TIMESTAMPS: "1"
PHP_OPCACHE_PRELOAD: "" Or if you prefer the ini method: opcache.enable=0 docker-compose.yaml php:
volumes:
- ./path-to-your/config-directory/php-ini-overrides.ini:/etc/php/7.4/fpm/conf.d/99-overrides.ini This should not affect your production setup. |
Beta Was this translation helpful? Give feedback.
You can try disabling the opcache via environment variables or via php-ini-overrides.ini. Try putting this into your docker-compose file, in the PHP section:
Or if you prefer the ini method:
php-ini-overrides.ini
opcache.enable=0
docker-compose.yaml
This should not affect your production setup.