Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 291620

Clean up MemoryCache and MemoryBackend naming issues

$
0
0

Problem/Motivation

Drupal\Core\Cache\MemoryCache\MemoryCache is a viable cache backend that can be used as a static cache replacement on its own, or in combination with BackendChain. See #2412669: Remove drupal_static from BookManager for an example.

Drupal\Core\Cache\MemoryBackend is a testing-only implementation of a cache backend, designed to mimic APC or database caching using PHP memory (i.e. it serializes and unserializes).

MemoryBackend should probably move under a testing namespace somewhere (with the current class deprecated), and MemoryCache should be refactored to not extend from it. Potentially we could even reverse the inheritance so that the testing backend inherits from MemoryCache.

Remaining tasks

The installer users MemoryBackend - likely because MemoryCache wasn't available at the time. However changing this should probably happen in isolation in a spin-off issue since it will change behaviour between serialize/unserialize.
#3223580: Use MemoryCache (not MemoryBackend) in the installer

User interface changes

API changes

Data model changes


Viewing all articles
Browse latest Browse all 291620

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>