openclassrooms/doctrine-cache-extension
A small extension to Doctrine's cache library that adds extra cache adapters and helpers, making it easier to wire alternative backends into Doctrine ORM and Symfony applications.
composer require openclassrooms/doctrine-cache-extension. Check the composer.json in the repo for the supported PHP and doctrine/cache version ranges before committing — this is a small package, so version alignment matters more than with a widely-used one.tests/ is usually the most accurate spec of intended behavior (constructor signatures, method contracts, edge cases). Skim the source tree to see what is actually added on top of Doctrine\Common\Cache.CacheProvider (prefixing/namespacing, collection-style caching, or a wrapper around existing providers). Identify the concrete class you will interact with and whether it implements Doctrine\Common\Cache\Cache / CacheProvider.ArrayCache in dev, RedisCache/ApcuCache/FilesystemCache in prod) with the extension, then run one real read-through: save a key, fetch it, delete it, and confirm the wrapper preserves fetch/save/delete/contains semantics.doctrine/cache version.Doctrine\Common\Cache\Cache service in your container. This keeps the extension swappable and lets you keep using the underlying provider directly for debugging.user:, catalog:) so a single backend can serve multiple features and deleteAll/flush stays scoped. Keep a single helper that builds keys ("{$domain}:{$id}") rather than string-concatenating at call sites.delete() calls through controllers.ArrayCache (or the extension wrapping ArrayCache) in tests so suites stay hermetic; assert both the cached and invalidated paths.getUser, rememberUser) that delegate to the extension, so the rest of the app never touches cache keys directly.symfony/cache is a one-file change.composer.json, and vendor/fork if you rely on it long-term.ArrayCache to rule out cache logic before blaming the backend; check provider-level errors (Redis timeouts, APCu disabled in CLI) which surface as silent cache misses rather than exceptions.CacheProvider decorator or extending the extension's wrapper class if you need custom behavior — the decorator boundary is the clean seam for adding logging, metrics, or key transforms.How can I help you explore Laravel packages today?