chore: no delayed cache flush after deploys

Waiting 150 s at the end of every deploy is impractical. The flush right
after the switch stays; the window in which the previous release can
still fill the page cache is documented in deploy.php.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
frommeandClaude Opus 5.5 committed 2026-10-24 15:03:23 +02:00
1 parent 837fca3b4c
commit fcf04dbca7
1 file changed
+3 -14
+3 -14
View File
@@ -188,23 +188,12 @@ task('deploy', [
// Caches belong to the release that goes live, so they are cleared after the symlink flip. Hooking
// into deploy:symlink rather than appending to the list above keeps them inside deploy:publish, ahead
// of deploy:unlock and deploy:success - a failing cache task must not follow a declared success.
// No OPcache reset (cachetool): its web adapter would need PHP under a host's typo3temp, and the
// stubs in the static docroots resolve "current" with readlink() on every request. Vhosts that point
// at current/public pick up a new release once PHP's path cache expires: see typo3:cache:flush:delayed.
// No OPcache reset (cachetool): its web adapter would need PHP under a host's typo3temp. Vhosts that
// point at current/public keep running the previous release until PHP's path cache expires (~2 min);
// pages it renders in that window stay in the page cache until the next flush.
after('deploy:symlink', 'typo3:cache:flush');
// A rollback switches the code back; pages cached by the other release must not survive it
after('rollback', 'typo3:cache:flush');
// Vhosts that point at current/public (unlike the stubs) keep running the previous release for a
// while after the switch: PHP caches the resolved "current" path (realpath_cache_ttl, 120 s by
// default) and OPcache the compiled files. Pages rendered in that window land in the page cache
// after the flush above, so flush once more when it has passed.
desc('TYPO3 - Clear all caches again once PHP has picked up the switched release');
task('typo3:cache:flush:delayed', function () {
run('sleep 150');
invoke('typo3:cache:flush');
});
after('deploy:success', 'typo3:cache:flush:delayed');
after('rollback', 'typo3:cache:flush:delayed');
after('deploy:failed', 'deploy:unlock');