Skip to content

Commit 5587c62

Browse files
clearing doctrine cache pool
1 parent 838a1e7 commit 5587c62

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

docker/app/phpfpm-entrypoint.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,16 @@ if [ "${RUN_MIGRATIONS:-false}" = "true" ]; then
3131
php bin/console doctrine:migrations:migrate --no-interaction --allow-no-migration
3232
fi
3333

34+
if [ "${APP_ENV:-prod}" != "dev" ]; then
35+
if php bin/console debug:container doctrine.result_cache_pool >/dev/null 2>&1 \
36+
&& php bin/console debug:container doctrine.system_cache_pool >/dev/null 2>&1; then
37+
echo "[entrypoint] Clearing Doctrine cache pools."
38+
php bin/console --no-interaction cache:pool:clear doctrine.result_cache_pool doctrine.system_cache_pool
39+
else
40+
echo "[entrypoint] Doctrine cache pools are not configured; skipping cache pool clear."
41+
fi
42+
fi
43+
3444
if [ "${APP_ENV}" = "dev" ]; then
3545
php bin/console cache:clear --no-interaction || true
3646
fi

0 commit comments

Comments
 (0)