We have a site where users make extensive use of scheduler to schedule publishing of articles etc.

Site crons are run externally through drush and elysia_cron is installed to give fine-grained control of the actual Drupal cron schedule.

The scheduler_cron task is set to run every 20 minutes and the site's cron is triggered every 10 minutes (though most cron tasks are set to run hourly).

Articles appear to be published at the correct time. But there is often a problem with it not appearing in the specified view/block on the homepage for some time.

We have a Varnish external cache in place which correctly obeys the 30 minutes of the Cache-control: public, max-age=1800 header that Drupal is sending from Development > Performance options.

Even if you ignore Varnish caching for 30 minutes, it can be up to 1-2 hours before the article appears in the block on the front page.

Is there another cron in elysia cron that we need to be running more frequently to force Drupal's front page views/blocks cache to rebuild?
node_cron perhaps?

We don't particularly want to be running system_cron every 20 minutes (which I believe flushes Drupal's internal cache)

EDIT: Does the rebuilding of views/blocks in Drupal's internal cache require system_cron to be running frequently? This article seems to suggest it might https://www.drupal.org/node/2377201, or that an alternate mechanism of just clearing the page cache is required. I'm a bit surprised this isn't already dealt with within the scheduler, also you shouldn't need to expire the whole cache just to update one block on one page.

  • Are you using Views to generate the frontpage or block areas? – Shawn Conn May 20 '15 at 22:20
  • Both I believe. Some views, some blocks – batfastad May 21 '15 at 11:39
  • But I believe the views/blocks cache settings are set to regenerate on content change, though whether that happens on node save or needs a cache clear to take effect I'm not sure – batfastad May 21 '15 at 12:17
  • If you're talking about Drupal 8, all View caches are invalidated whenever any content changes (CRUD) occur within that base table entity type (node_list cache tag). However if nothing actively changes (like waiting for a date to pass), Views won't know to invalidate its caches. – atwixtor Jan 23 '19 at 18:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.