Quantcast
Channel: Issues for XML sitemap
Viewing all articles
Browse latest Browse all 1238

Don't use $reset flag with node_load()

$
0
0

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.


Viewing all articles
Browse latest Browse all 1238

Trending Articles