We did #2340123: Setting cache tags can be tricky: use strings instead of nested arrays to improve DX without updating core.api.php's Cache API documentation. Oops. Let's fix that.

Comments

wim leers’s picture

Status: Active » Needs review
StatusFileSize
new1.82 KB
berdir’s picture

Status: Needs review » Reviewed & tested by the community

Looks good.

catch’s picture

Status: Reviewed & tested by the community » Needs review

Should we add an @see to the new helper there?

wim leers’s picture

catch: good question. But IMHO we shouldn't, because it's only useful in rare cases. No need to distract with edge cases. But what I do think that's still missing, is a mention of EntityInterface::getCacheTag(), because that will be an extremely common case, not an edge case. Right now, this text still creates the impression that you typically have to manually concoct your cache tags, which is error-prone, and which is precisely why EntityInterface::getCacheTags() exists.

What do you think, Berdir & catch?

chx’s picture

Title: Follow-up for #2340123 » Update core.api.php's Cache API documentation: cache tags are now set as strings

Making the title less of a riddle.

chx’s picture

Assigned: wim leers » berdir

And, making sure berdir sees this (please assign back to Wim after done, thanks!).

berdir’s picture

Assigned: berdir » wim leers
Status: Needs review » Needs work

Don't care about the helper that much, but having getCacheTags() and possibly getListCacheTags() mentioned here seems like a good idea?

wim leers’s picture

Status: Needs work » Needs review
Issue tags: +Documentation
StatusFileSize
new2.13 KB
new1.15 KB

Done. Should be good to go.

berdir’s picture

Assigned: wim leers » Unassigned
Status: Needs review » Reviewed & tested by the community

Looks good to me.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 8: 2344691-8.patch, failed testing.

dawehner’s picture

Issue tags: +Needs reroll

.

wim leers’s picture

Status: Needs work » Reviewed & tested by the community
Issue tags: -Needs reroll
StatusFileSize
new2.12 KB
alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Documentation is not frozen during beta. Committed 28123e2 and pushed to 8.0.x. Thanks!

  • alexpott committed 28123e2 on 8.0.x
    Issue #2344691 by Wim Leers: Update core.api.php's Cache API...

Status: Fixed » Closed (fixed)

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