We're working to make all blocks cacheable. This block can trivially be made cacheable. Let's just get it done.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Wim Leers’s picture

Status: Active » Needs review
FileSize
866 bytes
Wim Leers’s picture

Issue tags: +Spark, +sprint
jibran’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +Quick fix

We're working to make all blocks cacheable. This block can trivially be made cacheable. Let's just get it done.

Agreed so RTBC.

znerol’s picture

Perhaps this is a stupid question, but what is the performance benefit of caching this block? If I'm not mistaken this will generate an additional trip to the cache backend (which possibly might be the database), while rendering it is just a matter of feeding some static array into drupal_render. Has the render API really become slower than the database? Do we have benchmarks for that?

webchick’s picture

Status: Reviewed & tested by the community » Needs review

Good question.

Wim Leers’s picture

Title: Cacheable "Syndicate" block » Cacheable "Syndicate" block: never cache it, because it's cheaper to render
FileSize
1.13 KB

I was in a "convert all the blocks" frenzy, but I agree. In fact, we should do precisely the opposite: prevent caching, because it's so ridiculously cheap to render. A cache get implies I/O, and I/O is always going to be more expensive than a very limited number of CPU cycles. Therefore, avoid I/O altogether.

Wim Leers’s picture

Title: Cacheable "Syndicate" block: never cache it, because it's cheaper to render » Cacheable "Syndicate" block: never cache it, because it's cheaper to always render it
dawehner’s picture

Status: Needs review » Reviewed & tested by the community

Really wise observation!

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed to 8.x. Thanks!

  • Commit 0e21df5 on 8.x by webchick:
    Issue #2232385 by Wim Leers: Cacheable 'Syndicate' block: never cache it...
Wim Leers’s picture

Issue tags: -sprint

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.