{"id":29284929,"url":"https://github.com/macpaw/redis-schema-bundle","last_synced_at":"2026-01-20T16:34:09.903Z","repository":{"id":302735580,"uuid":"1013331953","full_name":"MacPaw/redis-schema-bundle","owner":"MacPaw","description":"Redis schema bundle","archived":false,"fork":false,"pushed_at":"2025-08-01T11:24:01.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"develop","last_synced_at":"2025-08-18T10:55:25.640Z","etag":null,"topics":["backend","macpaw","symfony"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MacPaw.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-03T18:09:21.000Z","updated_at":"2025-08-01T11:22:49.000Z","dependencies_parsed_at":"2025-07-04T00:36:33.753Z","dependency_job_id":"a4a30070-8eb3-4e82-8cd4-97ea79b8b80f","html_url":"https://github.com/MacPaw/redis-schema-bundle","commit_stats":null,"previous_names":["macpaw/redis-schema-bundle"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/MacPaw/redis-schema-bundle","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MacPaw%2Fredis-schema-bundle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MacPaw%2Fredis-schema-bundle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MacPaw%2Fredis-schema-bundle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MacPaw%2Fredis-schema-bundle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MacPaw","download_url":"https://codeload.github.com/MacPaw/redis-schema-bundle/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MacPaw%2Fredis-schema-bundle/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271083497,"owners_count":24696308,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-18T02:00:08.743Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["backend","macpaw","symfony"],"created_at":"2025-07-05T22:02:15.536Z","updated_at":"2026-01-20T16:34:09.895Z","avatar_url":"https://github.com/MacPaw.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Redis Schema Bundle\n\nThe **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).\n\nThis bundle builds on top of [Schema Context Bundle](https://github.com/macpaw/schema-context-bundle) to propagate the schema context across the app and decorate your Redis cache.\n\n## Features\n\n- Transparent key prefixing for Redis\n- Compatible with `Symfony\\Component\\Cache\\Adapter\\RedisAdapter`\n- Works with Symfony `CacheInterface` and `AdapterInterface`\n- Supports schema-based multitenancy\n\n---\n\n## Installation\n\n```bash\ncomposer require macpaw/redis-schema-bundle\n```\n\nIf you are not using Symfony Flex, register the bundle manually:\n\n```php\n// config/bundles.php\nreturn [\n    Macpaw\\SchemaContextBundle\\SchemaContextBundle::class =\u003e ['all' =\u003e true],\n    Macpaw\\RedisSchemaBundle\\RedisSchemaBundle::class =\u003e ['all' =\u003e true],\n];\n```\n## Configuration\nMake sure to register the base Redis adapter and decorate it with the schema-aware implementation:\n\n```yaml\n# config/services.yaml\n\nservices:\n    redis_cache_adapter:\n        class: Symfony\\Component\\Cache\\Adapter\\RedisAdapter\n        arguments:\n            - '@SymfonyBundles\\RedisBundle\\Redis\\ClientInterface'\n            - 'cache_storage'\n            - '%redis_default_cache_ttl%'\n\n    Macpaw\\RedisSchemaBundle\\Redis\\SchemaAwareRedisAdapter:\n        decorates: Symfony\\Component\\Cache\\Adapter\\RedisAdapter\n        arguments:\n            - '@.inner'\n            - '@Macpaw\\SchemaContextBundle\\Service\\BaggageSchemaResolver'\n```\n\n## Usage\nAnywhere you use Symfony cache services (injected via CacheInterface or AdapterInterface), your keys will automatically be prefixed based on the current schema.\nFor example:\n\n```php\npublic function __construct(private CacheInterface $cache) {}\n\npublic function save(): void\n{\n    $this-\u003ecache-\u003eget('user.123', function () {\n        return 'value';\n    });\n}\n```\nIf the schema is client_a, this will store key: client_a.user.123.\n\n## Testing\nTo run tests:\n```bash\nvendor/bin/phpunit\n```\n\n## Contributing\nFeel free to open issues and submit pull requests.\n\n## License\nThis bundle is released under the MIT license.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmacpaw%2Fredis-schema-bundle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmacpaw%2Fredis-schema-bundle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmacpaw%2Fredis-schema-bundle/lists"}