See #1722882-38: Plugin CacheDecorator caches globally, ignores request context, and does not specify tags for cache items.

The cache decorator definition needs to contain a cache tag, then it should work combined with the change in the issue above. Should be a one line change.

This will require test coverage:
- Enable two languages (see earlier patch in the other issue)
- Create an aggregator feed using one language and check the blocks
- Switch language and check blocks again.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

xjm’s picture

Berdir’s picture

Ok, here we go. Test coverage and the fix, which is trivial now that the cache decorator is fixed.

Berdir’s picture

Documentation fixes for the test. the wording there can probably be improved a bit :)

Berdir’s picture

And removed that commented out code, that wasn't actually necessary.

Berdir’s picture

Issue tags: -Needs tests

Has tests :)

aspilicious’s picture

Status: Needs review » Reviewed & tested by the community

Thnx!

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Wow! Great work on the test lines of code: fix line of code ratio! :D

Committed and pushed to 8.x. Thanks!

tim.plunkett’s picture

Status: Fixed » Reviewed & tested by the community
FileSize
713 bytes

This wasn't rerolled/retested after #293318: Convert Aggregator feeds into entities :(

webchick’s picture

Status: Reviewed & tested by the community » Fixed

bzzzt.

Committed and pushed to 8.x. Thanks!

sun’s picture

Why did we add this test to Aggregator module?

The code, logic, and fix belongs to Block module's plugin manager, so essential test coverage for Block module's own functionality lives in Aggregator module now.

Berdir’s picture

Well, we can move it. Aggregator was one of the obvious real use cases, so that's what I picked it for writing the test.

If #1888702: Use configuration selection instead of derivatives for some blocks happens, then we kinda need to move it, although I'm not sure if any real derivate examples will remain, is there a test derivate block plugin implementation that we could use?

sun’s picture

Status: Fixed » Needs review
FileSize
1.34 KB
Berdir’s picture

Status: Needs review » Reviewed & tested by the community

Yes, let's do this :)

catch’s picture

Opened #1907434: Add a helper for clearing of multiple (but finite) variations of cache IDs - cache tags might not be the best choice for stuff that only varies by language.

catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 8.x, thanks!

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