It would be really nice if there was a way to tie into the block cache system of views blocks.

CommentFileSizeAuthor
#6 340701.patch1.78 KBswentel

Comments

mfer’s picture

Poking my head around I see the commented out code in views_plugin_display_block.inc that would provide support. It says there is a core bug that needs to get fixed. Is there an issue on that? If not, a description of the problem? I'm willing to throw a little time and working on this.

swentel’s picture

Subscribing, I want to help investigating this too.

mfer’s picture

It seems if you change the cached setting drupal doesn't pick up that change. See #235673: Changes to block caching mode not caught.

mfer’s picture

A suggestion.... when views updates the block caching why don't we code views to update the cache field in the block table itself. It seems sort of hackish but is there another way?

swentel’s picture

Status: Active » Needs review

Ok, after skimming the code, I came up with a patch. It's a (quite dirty) fix which saves the cache setting of a block in the blocks table *if* the block allready exists there. Since display_id & view name can't be changed anymore in an existing view, this should be save afaik. Patch only changes views_plugin_display_block.inc and can the code easily be removed once #235673 gets in.

swentel’s picture

StatusFileSize
new1.78 KB

And now with patch

merlinofchaos’s picture

Status: Needs review » Fixed

Looks good to me. Committed. I did not thoroughly test this so anyone watching this may want to poke at it. Make sure it doesn't explode.

Status: Fixed » Closed (fixed)

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