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.

CommentFileSizeAuthor
#1 diff-entity_load_cache_reset-1964018.patch915 bytesjweowu
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jweowu’s picture

Status: Active » Needs review
FileSize
915 bytes
jweowu’s picture

Issue summary: View changes

Cross-referencing with core API issue

jweowu’s picture

jweowu’s picture

  • Alan D. committed 235770b on 7.x-3.x authored by jweowu
    Issue #1964018 by jweowu, Alan D.: Don't use  flag with node_load()
    
Alan D.’s picture

Status: Needs review » Fixed

Basic tests passed nicely :)

Thanks

Status: Fixed » Closed (fixed)

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