Drupal is a registered trademark of Dries Buytaert
Release: Drupal 10.3.6 Update released for Drupal core (10.3.6)! Release: Drupal 11.0.5 Update released for Drupal core (11.0.5)! Release: Drupal 10.2.9 Update released for Drupal core (10.2.9)! Release: Drupal 10.2.10 Update released for Drupal core (10.2.10)! Release: Drupal 10.3.7 Update released for Drupal core (10.3.7)! Release: Drupal 11.0.6 Update released for Drupal core (11.0.6)! Release: Drupal 10.3.8 Update released for Drupal core (10.3.8)! Release: Drupal 11.0.7 Update released for Drupal core (11.0.7)! Module Revived: Translation Management Tool 8.x-1.19 Module tmgmt updated after 7 months of inactivity (8.x-1.19). Usage Milestone: Account field split Module account_field_split crossed 10,000 active installs.
Granular Time Cache

Provides cache tags that invalidate with time.

Example use case

Think of an event calendar that only shows events whose date is in the future. How to cache that view? You can make the view uncacheable, and and event will disappear the exact second it is finished. But then you have an uncacheable page, very bad for performance. You can set view granularity to daily. Then all "today and future" events are displayed, which is usually fine. Give it a cache max-age and... no that will not work out. What you need is a cache tag that invalidates exactly at midnight.

This module to the rescue. It provides a "granulartimecache:daily" cache tag. Use the file Views Custom Cache Tags module, and you've won.

Available cache tags

The module defines the following granularity cache tags:

  • hourly
  • daily
  • monthly
  • hourly_exact

The last one is for educational purpose: 'hourly_exact' will always last for 60 minutes, while daily will last for 25 h on some days (think DST).

You can implement a hook to add additional tags. If you are convinced that any additional granularity is of popular demand, create an issue, and for best karma points, provide a MR.

Limitations

For the regular calendar-based cache tags, this module supports only one time zone: That set in admin/config/regional/settings (or that of the cron user if timezone by user is set).

For who needs it: Implementing cache tags per timezone should be straightforward though. MR appreciated.

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
2
Tracked since
Nov 2024
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 2
Maintenance
Dormant

Releases

Version Type Core Release date
1.0.1 Stable Nov 23, 2024
1.0.0 Stable Nov 22, 2024