Drupal's cache API is best-in-class, we have possibly the only cache tags implementation that works cross-storage and scales (e.g., laravel doesn't support arbitrary cache tags at all, php-cache stores all cache invalidations in a giant array). However it's not possible to use the cache API without the rest of core.
Move all the parts that make sense to Drupal\Component\Cache
- this will be most things except the database implementation.
We can't move the database backend because the database layer also isn't a component, but that could happen if and when it ever does, until then it can just stay in Drupal\Core
.
Once it's in a component, someone could write a PSR-6 adapter to allow using our backends like redis and memcache with other frameworks.
If it's never used by anyone outside core, then the worst we've done is changed some namespaces around and made dependencies more explicit.
Active
11.0 🔥