Normal view

Received — 14 January 2026 Drupal - Open Source Content Platform | #Celebr8D8

Can't set cache age on custom block

I have a weather block I built. Obviously I don't want it cached for the next week, but this is what Drupal is doing using its out of the box page caching.

That would be fine if I could find a way to override this, but I can't. I've tried everything suggested on various forums, but nothing is working.

The last thing I tried was creating a lazy builder but I couldn't even get that to work.

I don't entirely understand how Drupal caching works. But all I want to do is set the cache of the entire node (or ideally just the block) to an hour or two.

I have Redis caching set up if this makes any difference.

Any ideas? Thanks

EDIT:

I seem to have something working, although it's possibly not as granular as I would like. I did 3 things, and I'm not sure which worked and whether it was individually or in combination.

  1. Installed the Cache Control Override mod - https://www.drupal.org/project/cache_control_override

  2. Added this to my settings file:
    $config['system.performance']['cache']['page']['max_age'] = 3600;

  3. Added this to the block build array (in conjunction with existing 'max-age' => 3600,):
    'tags' => ['weather:' . $nid],

Will now do some experimenting to figure out which is essential. Note - It didn't work without 3.

submitted by /u/gwenver
[link] [comments]

What’s the most frustrating thing about maintaining a Drupal site?

I’ve been working with Drupal for a while and I’m curious how others handle ongoing support and maintenance.

When you run into Drupal bugs, configuration issues, or performance problems:

- Do you rely on forums?

- Slack/Discord?

- Internal devs?

- External support?

What works well for you, and what doesn’t?

I’m genuinely interested in how different people manage this, especially for smaller teams or solo developers.

submitted by /u/Common-Sign-2535
[link] [comments]

Drupal Canvas - a deep dive with Lauri and Balint

Drupal Canvas - a deep dive with Lauri and Balint

In this podcast like video, I sat together with Lauri and Balint and talked about Drupal Canvas, from the very beginning, to the strategy, technical details like the data structure, react and astro islands as well as the future of Drupal Canvas.

There are a lot of learnings and insights - not only about Drupal Canvas as a product, but also about how the CMS market will eventually evolve, how AI is changing the way we build products and React coming to the Drupal project.

submitted by /u/Hopeful-Fly-5292
[link] [comments]
❌