This patch:

- Renames DefaultFactory to ReflectionFactory, and adds a new DefaultFactory that just passes $configuration as a single constructor argument. Also, adds a custom CacheFactory to be able to pass $configuration['bin'] without reflection. This is because of #1497366-87: Introduce Plugin System to Core indicating there might be performance issues with reflection. In follow-ups we can investigate this further to understand better when we should/shouldn't use reflection.

- Removes PersistentVariableDiscovery in favor of having the Cache type do the variable_get() itself. This is because of #1497366-88: Introduce Plugin System to Core stating that we don't really know if variable_get() will continue to exist in D8, so let's not add a special discovery class for it.

- Reverts the change from 'cache_classes' to 'cache_backends'. This is because of #1323120-108: Convert cache system to PSR-0 identifying that 'cache_backends' still has an alternate purpose that we shouldn't clobber yet.

- Changes the Cache type to pass $this->discovery and $this->factory to the mapper instead of $this for each, because a) there's no functional impact to doing so, b) it's a small micro-optimization, and c) webchick's comment in #1497366-75: Introduce Plugin System to Core.

CommentFileSizeAuthor
plugins-cache-feedback.patch15.66 KBeffulgentsia
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

neclimdul’s picture

Status: Needs review » Fixed

As if the whole backend thing wasn't undocumented and confusing enough, #636454: Cache tag support added cache_get_backends which showed up in the merge conflicts... pushed and patch posted.

Would like to follow up with some more discreet unit tests though. Maybe a separate issue since there's probably some other pieces not well covered.

Status: Fixed » Closed (fixed)

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