API page: https://api.drupal.org/api/drupal/includes%21entity.inc/property/DrupalD...
The internal entity cache on entity controllers is internal... so in most cases you don't need to know what its structure is... unless you're subclassing the controller for your own entity type. Or you're working on a core patch ;)
I assume from a quick read of the code that it's keyed by entity ID.
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | drupal7-entity-documentation-2098129-11.patch | 404 bytes | pushpinderchauhan |
| #7 | drupal8-entity-documentation-2098129-7.patch | 524 bytes | pushpinderchauhan |
Comments
Comment #1
jhodgdonhttps://api.drupal.org/api/drupal/core!lib!Drupal!Core!Entity!EntityStor...
Seems like this is the D8 version... with same problem.
Comment #2
wouters_f commentedyou mean like this..?
Comment #3
jhodgdonThat looks fine! Can someone review and verify that this is correct information?
Comment #4
jhodgdonI have verified that this analysis is correct.
However, in verifying it I noticed that the cache-related methods on this class also need this documented. cacheSet() needs this in @param $entities, and cacheGet() in the @return.
Comment #5
berdirMaybe simplify to "Static cache of entities, keyed by entity ID.", possibly just keyed by ID?
Comment #6
jhodgdonGood idea.
Comment #7
pushpinderchauhan commentedLast patch is unable to apply, so no interdiff file. Please review attached patch.
Comment #8
slashrsm commentedComment #9
alexpottCommitted 4de4bad and pushed to 8.x. Thanks!
Comment #11
pushpinderchauhan commentedBack to D7 for backport.
Comment #12
pushpinderchauhan commentedPatch for D7.
Comment #15
jhodgdonSome weird test failure. Patch looks fine.
Comment #18
jhodgdonComment #19
jhodgdonThanks again! Committed to 7.x.