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, xmlsitemap_node_comment_update() can use entity_load_unchanged() to re-generate the specific node in question, without wiping out the entire node load cache.

Comments

jweowu’s picture

Status: Active » Needs review
StatusFileSize
new558 bytes
jweowu’s picture

Issue summary: View changes

Cross-referencing with core API issue

jweowu’s picture

jweowu’s picture

Cross-referencing with another variant of this bug in xml_sitemap.

alex_optim’s picture

+1

pifagor’s picture

Status: Needs review » Reviewed & tested by the community

  • pifagor committed da264b2 on 7.x-2.x authored by jweowu
    Issue #1963964 by jweowu, alex_optim, pifagor: Don't use $reset flag...
pifagor’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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