Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
comment.module
Priority:
Normal
Category:
Bug report
Assigned:
Issue tags:
Reporter:
Created:
16 Dec 2010 at 17:35 UTC
Updated:
3 Jan 2014 at 02:41 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
sunComment #2
sundrupal.comment-load-reset.0.patch queued for re-testing.
Comment #3
dixon_Comment #4
dixon_Re-rolled patch because of offset.
Comment #5
sunThanks!
Comment #6
dixon_Patch applies to D7 without offset, so should be ready for straight backport.
Comment #7
catchCommitted to 8.x, moving back to 7.x for webchick. This is an extra argument, so an API addition, and you could technically get around it via calling entity_load() directly, but it's good for consistency with the other entity functions and arguably a bug that we allow you to change the static caching via alter but no obvious way to clear that static if you do.
No tests here but everything gets passed straight down to entity_load() which does have them.
file_load() is also missing this, opened a followup at #1292374: Enable static caching for File entities.
Comment #8
webchickYeah, this looks harmless. Committed and pushed to 7.x. Thanks!
(Note: I thought the entire point of the drupal_static() obfuscation so we didn't have to do this $reset parameter crap everywhere?)
Comment #9
catchAh that's because entity static caching is inside the load controller class. But the only way to directly access that method is via _entity_get_controller(). So in D8 we'll be able to remove all the $reset for entities if the controller methods are exposed rather than wrapped in node_load() etc., but there's no nice way to do that yet.