stfalcon-studio/doctrine-redis-cache-bundle
Symfony bundle that configures Redis as a Doctrine cache provider, letting you cache ORM metadata, query results, and second-level cache data for faster database-backed applications with minimal setup.
composer require stfalcon-studio/doctrine-redis-cache-bundle. Symfony Flex should register it; otherwise add the bundle class to config/bundles.php.framework.cache. You still need a Redis provider/pool (e.g. cache.adapter.redis) and Doctrine pointed at the Doctrine pools (doctrine.orm.result_cache_pool, query_cache_pool, metadata_cache_pool).vendor/stfalcon-studio/doctrine-redis-cache-bundle/src/DependencyInjection/Configuration.php; the shape is typically something like:
# config/packages/stfalcon_doctrine_redis_cache.yaml
stfalcon_doctrine_redis_cache:
namespace: 'myapp_%kernel.environment%'
php bin/console cache:pool:list, then php bin/console debug:container doctrine.result_cache_pool and inspect the cache.pool tag’s namespace attribute. Confirm in Redis with redis-cli --scan --pattern 'myapp_*' | head.cache:pool:clear only touches the intended pool.Where to look first: the README, DependencyInjection/Configuration.php, and the compiler pass that rewrites cache.pool tags.
namespace: 'myapp_%kernel.environment%' gives you myapp_prod, myapp_staging, etc. A sensible default when sharing Redis.myapp_orders_prod, myapp_billing_prod. This is the main reason to reach for the bundle.%env(APP_VERSION)% or a release slug if you want an implicit flush per release — but old keys orphan until TTL.myapp_ci_%env(CI_PIPELINE_ID)%; clean up with a SCAN-based script because Symfony won’t know about stale namespaces.php bin/console cache:pool:clear doctrine.result_cache_pool clears only that pool’s namespace; cache:pool:invalidate-tags respects the namespace too.doctrine.orm.result_cache_pool still points at cache.app, the namespace change has no effect.cache:clear can’t touch production keys.namespace on the cache.pool tag. If the bundle lags a Symfony release, a small compiler pass in your app can replicate it.PREFIX, DB index, or ACLs. For hard isolation use separate DBs/instances/ACL users.redis-cli --scan + UNLINK cleanup, or keep lifetimes sane.cache.pool tag. Verify with debug:container --tag=cache.pool and check the namespace attribute.framework.cache with a Redis adapter/provider, and either the redis PHP extension or Predis.cache.app / cache.system get the custom namespace unless the docs say so.{hash tags} can, but verify Symfony’s key builder handles braces before relying on it.cache:pool:list → debug:container <pool> → debug:container --tag=cache.pool → redis-cli --scan --pattern '<ns>*'. If keys lack the namespace, the pool isn’t using the tag you think it is.cache:clear runs all pool clearers; cache:pool:clear <pool> avoids collateral damage.test_%env(TEST_TOKEN)%) and clear it, or you’ll get cross-run Doctrine cache contamination.How can I help you explore Laravel packages today?