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.
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | 2344691-12.patch | 2.12 KB | wim leers |
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.
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | 2344691-12.patch | 2.12 KB | wim leers |
Comments
Comment #1
wim leersComment #2
berdirLooks good.
Comment #3
catchShould we add an @see to the new helper there?
Comment #4
wim leerscatch: 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 whyEntityInterface::getCacheTags()exists.What do you think, Berdir & catch?
Comment #5
chx commentedMaking the title less of a riddle.
Comment #6
chx commentedAnd, making sure berdir sees this (please assign back to Wim after done, thanks!).
Comment #7
berdirDon't care about the helper that much, but having getCacheTags() and possibly getListCacheTags() mentioned here seems like a good idea?
Comment #8
wim leersDone. Should be good to go.
Comment #9
berdirLooks good to me.
Comment #11
dawehner.
Comment #12
wim leersComment #13
alexpottDocumentation is not frozen during beta. Committed 28123e2 and pushed to 8.0.x. Thanks!