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.
Once #1786490: Add caching to the state system is in, we should convert the existing CacheArray class to use CacheCollector.
This especially has the advantage that the values aren't saved on destruction but on the destruction event.
On the longrun we shoud certainly try to get rid of the magic functions in CacheArray and just use the methods of CacheCollector, which will basically mean to remove CacheArray.
Comment | File | Size | Author |
---|---|---|---|
#4 | deprecate-cache-array-1957092-4.patch | 575 bytes | Berdir |
Comments
Comment #1
BerdirYes, I would suggest to just drop CacheArray completely, possibly an issue per sub-class?
Comment #2
dawehnerSounds like a good idea!
Comment #3
BerdirUnpostponing.
We have three remaining implementations that use Cache array, module list, schema and theme registry. The latter two already have an issue, so I opened #2025779: Remove ModuleInfo as it is no longer necessary
Comment #4
Berdirhere's the @deprecated tag for CacheArray.
Comment #5
dawehnerIt is a bad idea in general to rely on magic, if it is not needed.
Comment #6
catchCommitted/pushed to 8.x, thanks!
Leaving open since this is a meta.
Comment #7
ianthomas_ukComment #8
ianthomas_ukComment #9
ianthomas_ukIt looks like the theme registry has already been converted, but can anyone find the issue for SchemaCache?
Comment #10
ianthomas_ukOther issue was #2185015: Remove SchemaCache and CacheArray
Comment #11
BerdirOk, the last one is #2185015: Remove SchemaCache and CacheArray. Closing.