Problem/Motivation

We have very nice caching capability and nice docs at https://www.drupal.org/developing/api/8/render/arrays/cacheability (linked from https://www.drupal.org/developing/api/8/cache even) but even this can be made better.

Proposed resolution

Both https://www.drupal.org/developing/api/8/render/arrays/cacheability and https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Render%21... needs a list of things you can pass to addCacheableDependency . For example , I didn't know config can be added.

http://wimleers.com/talk-making-drupal-fly-fastest-drupal-ever-near/ should be brought to drupal.org -- if the video doesn't come over that's fine IMO, I learned a lot without the video even.

Remaining tasks

User interface changes

API changes

Data model changes

Comments

Wim Leers’s picture

Issue tags: +D8 cacheability

+1, thanks for creating this issue!

I'm planning to work on this this week.

Wim Leers’s picture

Wim Leers’s picture

Rewrote https://www.drupal.org/developing/api/8/cache/tags, and gave it a clean URL consistent with the others.

Wim Leers’s picture

Wim Leers’s picture

Cleaned up the child pages of https://www.drupal.org/developing/api/8/cache; the remaining ones are all solid (they're the ones mentioned in #3 + #4, plus https://www.drupal.org/developing/api/8/cache/contexts, which I've also updated slightly to be in sync with the two others, structure-wise).

Filed #2541432: Follow-up for #2231595: Document why ChainedFastBackend cannot use BackendChain because that is quite confusing ATM.

Wim Leers’s picture

Wim Leers’s picture

Rewrote https://www.drupal.org/developing/api/8/cache.

Next: work on documenting CacheableDependencyInterface + addCacheableDependency().

Wim Leers’s picture

For example , I didn't know config can be added.

But https://www.drupal.org/developing/api/8/render/arrays/cacheability#concr... has been mentioning this all along. In the code example, we even specifically call addCacheableDependency($render_array, $config).

AFAICT you simply hadn't read that yet?

chx’s picture

True. I haven't caught that. Sorry. Nonetheless such a list on https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Render%21... would be desirable I guess?

Wim Leers’s picture

Now also created https://www.drupal.org/developing/api/8/cache/cacheable-dependency-inter.... That should address the remaining concerns.

Making one last pass now.

Wim Leers’s picture

Status: Active » Fixed

Made that last pass; AFAICT we're in a pretty good place now. If you have further concrete suggestions, let me know.

Status: Fixed » Closed (fixed)

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