Follow-up from #1194136: Re-organise core cache bins. I may have opened an issue for this already and lost it, apologies if so.

We can rename the default 'cache' bin to 'cache_default'

Looks like this:

-    arguments: ['@container.namespaces', '@cache.cache', '@language_manager', '@module_handler', '@string_translation']
+    arguments: ['@container.namespaces', '@cache.default', '@language_manager', '@module_handler', '@string_translation']

Also that bin is currently special-cased in storage implementations to avoid the table being cache_cache, that could be removed.

Comments

damiankloip’s picture

Status: Active » Needs review
StatusFileSize
new19.03 KB

Here is an initial patch, let's see what fails.

The main issue with trying to rename this is that in conflicts with our current directive of using 'default' under the cache settings in settings.php to change the default backend for all bins. Spoke to catch briefly about this. We could nest the per bin stuff one level deeper. So

$settings['cache']['default'] = 'my.default.bin';
$settings['cache']['my_bin'] = 'my.cache.bin';

Would become:

$settings['cache']['default'] = 'my.default.bin';
$settings['cache']['bins']['my_bin'] = 'my.cache.bin';

Status: Needs review » Needs work

The last submitted patch, 1: 2221065.patch, failed testing.

damiankloip’s picture

Status: Needs work » Needs review

1: 2221065.patch queued for re-testing.

Status: Needs review » Needs work

The last submitted patch, 1: 2221065.patch, failed testing.

berdir’s picture

Status: Needs work » Needs review
StatusFileSize
new19.26 KB

Conflicted in migration.services.yml.

Status: Needs review » Needs work

The last submitted patch, 5: 2221065-5.patch, failed testing.

berdir’s picture

Status: Needs work » Needs review

5: 2221065-5.patch queued for re-testing.

Status: Needs review » Needs work

The last submitted patch, 5: 2221065-5.patch, failed testing.

damiankloip’s picture

Status: Needs work » Needs review

5: 2221065-5.patch queued for re-testing.

We know this will fail - just re-testing so we can see/debug this on the bot servers.

Status: Needs review » Needs work

The last submitted patch, 5: 2221065-5.patch, failed testing.

berdir’s picture

Status: Needs work » Needs review
StatusFileSize
new19.29 KB

Re-roll.

Status: Needs review » Needs work

The last submitted patch, 11: 2221065-11.patch, failed testing.

damiankloip’s picture

Status: Needs work » Needs review
StatusFileSize
new26.7 KB
new7.41 KB

Hopefully this will fix those...

Status: Needs review » Needs work

The last submitted patch, 13: 2221065-13.patch, failed testing.

damiankloip’s picture

Status: Needs work » Needs review
StatusFileSize
new26.82 KB

Reroll.

damiankloip’s picture

15: 2221065-15.patch queued for re-testing.

Status: Needs review » Needs work

The last submitted patch, 15: 2221065-15.patch, failed testing.

damiankloip’s picture

Status: Needs work » Needs review
StatusFileSize
new25.42 KB

Rerolled after cache bins re-organisation.

Status: Needs review » Needs work

The last submitted patch, 18: 2221065-18.patch, failed testing.

damiankloip’s picture

Status: Needs work » Needs review
StatusFileSize
new2.49 KB
new2.49 KB

Reroll fun.

Status: Needs review » Needs work

The last submitted patch, 20: 2221065-20.patch, failed testing.

wim leers’s picture

Status: Needs work » Needs review
StatusFileSize
new3.11 KB
new668 bytes

This should at least allow Drupal to be installed again :)

damiankloip’s picture

HAHA, yes. That will indeed help.

Status: Needs review » Needs work

The last submitted patch, 22: 2221065-22.patch, failed testing.

wim leers’s picture

Status: Needs work » Needs review
StatusFileSize
new14.88 KB
new12 KB

Status: Needs review » Needs work

The last submitted patch, 25: 2221065-25.patch, failed testing.

damiankloip’s picture

Status: Needs work » Needs review
StatusFileSize
new27.76 KB
new2.49 KB

Apologies, the reroll in @#20 was completely wrong (see the size) and the subsequent rerolls were based on that, which is just trying to redo work already done.

Another reroll based on #18.

wim leers’s picture

sun’s picture

Title: Rename 'cache' bin to 'cache_default' » Rename default 'cache' cache bin to 'default'

Fixing issue title to prevent confusion.

That said, I'm a bit terrified by the amount of instances of "default" in the D8 code base, all having different meanings... And for a cache bin, I wonder whether "default" really is an appropriate term, given that each bin has a clear use-case, and the "default" bin should only be the last resort...?

I don't want to start a bikeshed, but how about naming it "misc" instead of "default"?

"misc" == Dumping ground for miscellaneous stuff that doesn't fit into any of the other bins for any reason.

damiankloip’s picture

Seems like that is that start of a bikeshed to me .... :)

That said, I'm a bit terrified by the amount of instances of "default" in the D8 code base

Seems a bit extreme? Did you just grep for 'default' or something?!

Default is a popular word. This seems like a logical use of 'default', plus this is the default cache bin, so the name is apt IMO. I'm sorry but misc is not a good name.

damiankloip’s picture

StatusFileSize
new27.27 KB

Rerolled.

wim leers’s picture

Status: Needs review » Reviewed & tested by the community

I agree with #30 completely. "default" is clear, it's just used in many different contexts, not in different meanings.

catch’s picture

Status: Reviewed & tested by the community » Needs work

Yes agreed on the naming as well. Default is very clear and just a common word, it's not like 'module' or 'entity' where our usage is specific.

Patch no longer applies unfortunately though.

berdir’s picture

Status: Needs work » Reviewed & tested by the community
StatusFileSize
new27.29 KB

Only context changes, so back to RTBC.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 34: 2221065-34.patch, failed testing.

jibran’s picture

Status: Needs work » Needs review

34: 2221065-34.patch queued for re-testing.

Status: Needs review » Needs work

The last submitted patch, 34: 2221065-34.patch, failed testing.

damiankloip’s picture

Status: Needs work » Needs review
StatusFileSize
new27.59 KB
new457 bytes
damiankloip’s picture

Status: Needs review » Reviewed & tested by the community

Just a rerolled with above change for the library discovery patch. I think this can still be RTBC.

  • Commit 3a5e997 on 8.x by catch:
    Issue #2221065 by damiankloip, Wim Leers, Berdir: Rename default 'cache...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 8.x, thanks!

Status: Fixed » Closed (fixed)

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