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.

CommentFileSizeAuthor
#4 deprecate-cache-array-1957092-4.patch575 bytesBerdir
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Berdir’s picture

Yes, I would suggest to just drop CacheArray completely, possibly an issue per sub-class?

dawehner’s picture

Title: Convert CacheArray to use CacheCollector » Meta: Convert CacheArray to use CacheCollector

Sounds like a good idea!

Berdir’s picture

Status: Postponed » Active

Unpostponing.

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

Berdir’s picture

Status: Active » Needs review
FileSize
575 bytes

here's the @deprecated tag for CacheArray.

dawehner’s picture

Status: Needs review » Reviewed & tested by the community

It is a bad idea in general to rely on magic, if it is not needed.

catch’s picture

Status: Reviewed & tested by the community » Active

Committed/pushed to 8.x, thanks!

Leaving open since this is a meta.

ianthomas_uk’s picture

Title: Meta: Convert CacheArray to use CacheCollector » [META] Remove CacheArray
Issue summary: View changes
Issue tags: +@depreacted
Related issues: +#2025779: Remove ModuleInfo as it is no longer necessary
ianthomas_uk’s picture

Issue tags: -@depreacted +@deprecated
ianthomas_uk’s picture

We have three remaining implementations that use Cache array, module list, schema and theme registry.

It looks like the theme registry has already been converted, but can anyone find the issue for SchemaCache?

ianthomas_uk’s picture

Berdir’s picture

Status: Active » Closed (duplicate)

Ok, the last one is #2185015: Remove SchemaCache and CacheArray. Closing.