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.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | bean-cacheclear-1793586.patch | 373 bytes | Mixologic |
| cacheclear.patch | 373 bytes | Mixologic |
Comments
Comment #1
MixologicSame patch, better filename.
Comment #2
MixologicI suppose I could mark it needs review..
Comment #3
indytechcook commentedI 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...
Comment #4
joelcollinsdc commentedI 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
Comment #5
joelcollinsdc commentedsetting back to fixed