Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
in #2161591: Change default active config from file storage to DB storage we're discussing replacing the active store with a queryable key value based store. Whilst reviewing the relevant code I realised we could swap out calls to Drupal::config()->get() with a call to ConfigFactory::readMultiple().
This should help us leverages the static cache in ConfigFactory better.
Comment | File | Size | Author |
---|---|---|---|
#4 | 2163371_4.patch | 4.47 KB | alexpott |
#3 | 2163371.3.patch | 4.47 KB | alexpott |
#3 | 1-3-interdiff.txt | 703 bytes | alexpott |
#1 | 2163371.1.patch | 4.62 KB | alexpott |
Comments
Comment #1
alexpottHere's a patch.
Comment #2
alexpottComment #3
alexpottOk. reading the code realised that the patch in #1 would break count queries on empty result sets.
Comment #4
alexpottA dot free patch
Comment #5
Anonymous (not verified) CreditAttribution: Anonymous commentedlooks good to me. alexpott++
Comment #6
BerdirTo me as well.
It's not as much about the static cache but the persistent cache in the cached storage controller, a getMultiple() is a single getMultiple() on the cache backend, which is more efficient.
Comment #7
webchickNice catch!
Committed and pushed to 8.x. Thanks!