Resetting an entity_load cache bin in Drupal 7 can have more drastic consequences than in previous versions of Drupal, as we can have persistent load caches in place of the PHP static memory cache.
Instead, wherever possible, only flush the necessary entities from the cache, using entity_get_controller($entity_type)->resetCache(array($entity_id));
In this case, the uses of $reset
in diff_inline_show()
appear to be entirely redundant, as a revision id is being specified, and when loading a revision the entity load cache is not used at all (even if it is the current revision); the entity object is always generated freshly in that situation.
As such, I think we can simply remove the flag from those calls.
Comment | File | Size | Author |
---|---|---|---|
#1 | diff-entity_load_cache_reset-1964018.patch | 915 bytes | jweowu |
Comments
Comment #1
jweowu CreditAttribution: jweowu commentedComment #1.0
jweowu CreditAttribution: jweowu commentedCross-referencing with core API issue
Comment #2
jweowu CreditAttribution: jweowu commentedComment #3
jweowu CreditAttribution: jweowu commentedComment #5
Alan D. CreditAttribution: Alan D. commentedBasic tests passed nicely :)
Thanks