Repository navigation
fix(auth): remove the post-login cache warmup that could never run - #138
Conversation
The shutdown hook registered at login looked for expired page-cache entries through an 'is_expired' key that getStats() never returns (the key is 'expired'), so it has never fired. Fixing the key would have made every login with an expired entry clear the whole page cache and rebuild the home synchronously. It is not needed any more: invalidation is soft and each page is rebuilt single-flight on its next visit, with home and galleries re-warmed after a save. The README bullet that advertised it is dropped.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
WalkthroughDopo un accesso amministrativo riuscito, il controller non avvia più il preriscaldamento delle cache. Il README non include più la relativa descrizione. La risposta di accesso continua a reindirizzare a ChangesAccesso amministrativo e cache
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
Problem
AuthControllerregistered a shutdown hook at login that was meant to warm the page cache when it found expired entries. It checked$item['is_expired'], a keyPageCacheService::getStats()never returns (the key isexpired), so the hook has never done anything.Fixing the key was not the right move: it would have made every login that finds an expired entry call
clearAll()on the page cache and rebuild the home synchronously — on hosts withoutfastcgi_finish_request()that delays the login redirect, and it throws away entries that are still fresh.Change
The hook is removed, along with its two now-unused imports and the README bullet that advertised it. It is not needed any more: invalidation is soft, each page is rebuilt single-flight on its next visit (#136, #137), and home and galleries are re-warmed after a content save.
Verification
/admin, dashboard 200.app/. Semgrep: no new findings.admin-csrf-resilienceandalbum-edit-cachepass.Summary by CodeRabbit