bear / query-repository
AboutResource Query Responsibility Segregation (RQRS) is a caching framework for BEAR.Sunday that optimizes performance by separating query and command responsibilities. It features event-driven cache invalidation, dependency resolution, donut caching, CDN integration, and conditional requests.
1.16.1
2026-05-31 16:54 UTC
Requires
- php: ^8.2
- bear/resource: ^1.16.1
- bear/sunday: ^1.5
- psr/cache: ^1.0 || ^2.0 || ^3.0
- ray/aop: ^2.19.1
- ray/di: ^2.20
- ray/psr-cache-module: ^1.5.1
- symfony/cache: ^5.3 || ^6.0 || ^7.3
- symfony/cache-contracts: ^2.4 || ^3.0
- symfony/polyfill-php83: ^v1.32.0
Requires (Dev)
- bamarni/composer-bin-plugin: ^1.8
- bear/fastly-module: ^1.0
- madapaja/twig-module: ^2.6
- mobiledetect/mobiledetectlib: ^3.74 || ^4.8
- phpunit/phpunit: ^11.0
- predis/predis: ^2.4
- symfony/process: ^6.1 || ^7.1
- twig/twig: ^3.4.3
Suggests
- ext-memcached: Required for Memcached cache storage backend
- ext-redis: Required for Redis cache storage backend
This package is auto-updated.
Last update: 2026-06-12 17:00:26 UTC
README
BEAR.QueryRepository is a distributed caching framework for BEAR.Resource applications, inspired by CQRS. It segregates reads and writes into separate repositories to optimize performance and resource utilization.
Key Features
- Event-Driven Cache Invalidation: Automatically invalidates cache when data changes, ensuring consistency.
- Dependency Resolution: Resolves dependencies between resources and updates related caches automatically.
- Donut Caching: Combines dynamic and static content for efficient partial caching.
- CDN Integration: Seamlessly integrates with modern CDNs (e.g., Fastly, Akamai) for shared cache management.
- Conditional Requests with ETag Support: Reduces network overhead by leveraging
ETagand304 Not Modifiedresponses. - Distributed Cache Support: Works with server-side caches (e.g., Redis, APC), shared caches (e.g., CDNs), and client-side caches.