Closed (fixed)
Project:
Drupal core
Version:
8.7.x-dev
Component:
entity system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
16 Sep 2018 at 15:27 UTC
Updated:
6 Jan 2019 at 13:39 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
volegerFilled CR https://www.drupal.org/node/3000037
Comment #3
volegerComment #5
volegerComment #6
mile23Some minor stuff.
Needs a version update.
A little more readable, since we don't use
$info, and maybe save some memory:foreach (array_keys($this->getDefinitions) as $entity_type) {Comment #7
volegerAddressed #6
Comment #8
borisson_Looks great, all the nits in #6 were fixed.
Comment #9
volegerComment #10
catchThis isn't being called anywhere in core, why not deprecate it without a replacement?
Comment #11
mile23Because public API.
Comment #12
berdir> Because public API.
How is that an argument?
This is a helper method from long ago, basically the beginnings of having cache tags. As @catch said, there are no calls to it, because there really isn't a use case to invalidate *all* rendered entities, 90% use case is a specific entity type, and most of that happens now automatically and implicitly by saving entities, view displays or so, another 8% is invalidating everything through the rendered or similar cache tags, and if there's really something left, someone can loop over it themself.
+1 to deprecate without replacement.
Comment #13
berdirAlso the new method does not make sense, it's way too unspecific about what it really does to be on EntityTypeManagerInterface.
Comment #14
berdirMore proof: http://grep.xnddx.ru/search?text=entity_render_cache_clear&filename=
Only 3 modules call this function, and they all should be invalidating the complete render cache or have their own cache tag IMHO.
Comment #15
berdirLovely, crosspost with myself.
Comment #16
volegerHere the updated patch. Also, CR was updated.
Comment #17
berdirI'd add .. "or invalidate specific cache tags."
function is missing in the message.
Comment #18
volegerOh, sure. Thanks.
Comment #19
volegerwrong status
Comment #20
berdirGood. Maybe also include an explicit cache tag example or reference the cache tag/cacheablity documentation in the change record, but the patch looks fine.
Comment #21
volegerUpdated CR with a link to related cache api documentation.
Comment #22
alexpottCommitted 2e30a3c and pushed to 8.7.x. Thanks!
Fixed the comment flow and indentation on commit.