This project is not covered by Drupal’s security advisory policy.
This module will allow Drupal to set a timestamp for a cache tag to expire / invalidate.
Ct_expire comes with a fieldwidget for "datetime" fields, this widget allows you to automatically invalidate entities when that timestamp field passes.
This is my personal easy to use fix for Drupal's max-age issue in combination with page cache.
See: https://www.drupal.org/docs/drupal-apis/cache-api/cache-max-age#s-limita...
Getting started
This can be used either trough the service or with the fieldwidget that uses this service.
Field widget can be selected when editing the form display of entities ( for datetime fields).
The service can be called as followed:
$ct_expire = \Drupal::service('ct_expire.scheduler');
$ct_expire->schedule('node:12', 1687186106, 'node_12_paragraph_21_field_publish_date');
Use "schedule" function to set a cache tag to be invalidated on certain timestamp.
Make sure to include a useful name ( see above example ) . This will make it easy to trace it back in your database if any complication occurs with it.
Similar projects
None that i know of, but it has been a while since i checked.
Project information
- Project categories: Performance
- Created by willempje2 on , updated
This project is not covered by the security advisory policy.
Use at your own risk! It may have publicly disclosed vulnerabilities.
