There have been a number of cases where contrib modules call field_attach_update() to update field values without saving an entity. This leads to stale caches unless the contrib module manually resets the cache.

The documentation for field_attach_update() should mention that caches need to be cleared.

See this issue in the Entity Cache queue for details:
#1966164: Consider implementing hook_field_attach_update() to clear cache when field values are updated

CommentFileSizeAuthor
d7-document-field-attach-update-cache.patch608 bytesmilesw
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

milesw’s picture

Issue summary: View changes
Issue tags: +documention

Tagging

rp7’s picture

I totally agree.

parthipanramesh’s picture

Status: Needs review » Reviewed & tested by the community

Good idea to note that!

David_Rothstein’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 7.x - thanks! http://drupalcode.org/project/drupal.git/commit/ccec3e9

Not totally sure that calling field_attach_update() outside an entity save is a good idea, but then again, the patch isn't specifically recommending it either :)

Status: Fixed » Closed (fixed)

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