Install
Works with Drupal: ^11 || ^12Using Composer to manage Drupal site dependencies
Alternative installation files
Release notes
Drupal 12 support
Requires Drupal 11 or 12; tested on Drupal 11.4.13 and 12.0.0-beta2. Sites on Drupal 10 should stay on 1.0.0.
- The middleware accepts the wrapped kernel as a closure, as Drupal 12's page cache requires (change record).
- The Status report entries are provided through an OO hook, because Drupal 11.3 and later no longer run a legacy
hook_requirements()marked as such (change record). - A cache backend method removed in Drupal 12 is no longer called.
New since 1.0.0
- Page archive. Rendered pages are also kept in a database table, so a stale page can still be served if the page cache backend evicts it (for example Redis under an LRU policy). It has modes (auto, always, off), caps on page count and size, and a refresh interval.
- Storage report. The Performance page and Status report show where pages are stored and whether that store can evict them. They warn when unlimited retention is paired with a store that can.
- Takedown. The cached page of content that is unpublished or deleted is removed, so a stale copy is not served.
- Retention setting. A stale page is now served however old it is. Retention only controls how long pages are kept, and can be unlimited.
- Queue limit setting. Caps how many stale pages wait for cron at once.
- Clearer status. The module says when it is doing nothing, such as while the page cache maximum age is 0.
Upgrading from 1.0.0
Run database updates (drush updb) and clear caches. This adds the archive table and its settings, and moves your saved max_stale_age value to the new retention setting.
If you fix this value in settings.php, rename $settings['embettered_page_cache_max_stale_age'] to $settings['embettered_page_cache_retention']. The update tells you if it finds the old name, and until you rename it the one-year default applies.
The meaning of the setting has changed. A stale page is now served however old it is, and the value only says how long pages are kept.