Over in #2248767: Use fast, local cache back-end (APCu, if available) for low-write caches (bootstrap, discovery, and config) we propose using CachedStorage for configuration so that is the web server has APCu installed we can take advantage of it. Config collections introduced the possibility of cache keys exceeding the 255 max. This has since been fixed to so can include the collection in the cache key.

Files: 
CommentFileSizeAuthor
#4 interdiff.txt7.75 KBeffulgentsia
#4 2326203.4.patch15.33 KBeffulgentsia
PASSED: [[SimpleTest]]: [PHP 5.4 MySQL] 75,117 pass(es). View
#1 2326203.1.patch13.43 KBalexpott
FAILED: [[SimpleTest]]: [PHP 5.4 MySQL] 75,069 pass(es), 1 fail(s), and 1 exception(s). View

Comments

alexpott’s picture

Status: Active » Needs review
FileSize
13.43 KB
FAILED: [[SimpleTest]]: [PHP 5.4 MySQL] 75,069 pass(es), 1 fail(s), and 1 exception(s). View

We have pretty good test coverage of cached storage. Berdir++

sun’s picture

Almost wanted to RTBC, but spotted two issues:

  1. +++ b/core/lib/Drupal/Core/Config/CachedStorage.php
    @@ -98,32 +85,40 @@ public function read($name) {
    +      // Whilst the keys of $cache_keys should be the configuration names that
    +      // would for implementation details on CacheBackendInterface::getMultiple()
    +      // that we should not trust.
    

    This English sentence doesn't parse for me, and I don't understand what it tries to say.

  2. +++ b/core/lib/Drupal/Core/Config/CachedStorage.php
    @@ -278,4 +274,43 @@ public function getCollectionName() {
    +  protected function createCacheKey($name) {
    ...
    +  protected function createCacheKeys(array $names) {
    

    "create" is an actual operation, especially within the scope of a storage related service.

    Can we rename these to generate*(), please?

Status: Needs review » Needs work

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

effulgentsia’s picture

Status: Needs work » Needs review
FileSize
15.33 KB
PASSED: [[SimpleTest]]: [PHP 5.4 MySQL] 75,117 pass(es). View
7.75 KB

Fixes test and addresses #2.

sun’s picture

Status: Needs review » Reviewed & tested by the community
webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed to 8.x. Thanks!

  • webchick committed 64bd363 on 8.0.x
    Issue #2326203 by effulgentsia, alexpott: Fixed Config's cached storage...

Status: Fixed » Closed (fixed)

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