Download the PHP package macpaw/redis-schema-bundle without Composer
On this page you can find all versions of the php package macpaw/redis-schema-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download macpaw/redis-schema-bundle
More information about macpaw/redis-schema-bundle
Files in macpaw/redis-schema-bundle
Package redis-schema-bundle
Short Description A Symfony bundle to add schema prefixes for redis keys
License MIT
Informations about the package redis-schema-bundle
Redis Schema Bundle
The Redis Schema Bundle provides automatic Redis key namespacing based on the current schema context, allowing data isolation in shared environments (e.g., staging, preview, multi-tenant).
This bundle builds on top of Schema Context Bundle to propagate the schema context across the app and decorate your Redis cache.
Features
- Transparent key prefixing for Redis
- Compatible with
Symfony\Component\Cache\Adapter\RedisAdapter - Works with Symfony
CacheInterfaceandAdapterInterface - Supports schema-based multitenancy
Installation
If you are not using Symfony Flex, register the bundle manually:
Configuration
Make sure to register the base Redis adapter and decorate it with the schema-aware implementation:
Usage
Anywhere you use Symfony cache services (injected via CacheInterface or AdapterInterface), your keys will automatically be prefixed based on the current schema. For example:
If the schema is client_a, this will store key: client_a.user.123.
Testing
To run tests:
Contributing
Feel free to open issues and submit pull requests.
License
This bundle is released under the MIT license.
All versions of redis-schema-bundle with dependencies
macpaw/schema-context-bundle Version ^2.0
symfony/cache Version ^6.4|^7.0