When the content of a bean is edited, the page cache is becomes outdated and invalid and needs to be cleared, much like whenever a node is edited on the site.

Attached is a patch that mimics the behavior seen in node_form_submit (as seen in modules/node/node.pages.inc)

Though it seems crude to flush every cache on the system, Im not sure what caches should *not* be rebuilt, so I believe that mimicing node_form_submit is the way to go here.

CommentFileSizeAuthor
#1 bean-cacheclear-1793586.patch373 bytesMixologic
cacheclear.patch373 bytesMixologic
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Mixologic’s picture

FileSize
373 bytes

Same patch, better filename.

Mixologic’s picture

Status: Active » Needs review

I suppose I could mark it needs review..

indytechcook’s picture

Status: Needs review » Fixed

I added this but put it in bean::save which might not be the best place if doing mass updates but feels like the right place otherwise.

http://drupal.org/commitlog/commit/22232/e4238095c52f070c8e226f87d8c2455...

joelcollinsdc’s picture

Status: Fixed » Needs work

I could have sworn that this worked, but alas it did not.

I tried it with a 'drupal_flush_all_caches()' and that did work, but it may be too heavy for this use case.

edit: sorry this may not have been exactly the issue i thought it was. I was specifically referring to what i mentioned here: #1851294: New bean types don't appear until cache clear

joelcollinsdc’s picture

Status: Needs work » Fixed

setting back to fixed

Status: Fixed » Closed (fixed)

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