PHPackages                             bear/query-repository - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Caching](/categories/caching)
4. /
5. bear/query-repository

ActiveLibrary[Caching](/categories/caching)

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.15.1(3mo ago)6549.4k↓10.2%93MITPHPPHP ^8.2CI passing

Since Feb 13Pushed 3mo ago3 watchersCompare

[ Source](https://github.com/bearsunday/BEAR.QueryRepository)[ Packagist](https://packagist.org/packages/bear/query-repository)[ RSS](/packages/bear-query-repository/feed)WikiDiscussions 1.x Synced 1mo ago

READMEChangelog (10)Dependencies (17)Versions (93)Used By (3)

BEAR.QueryRepository
====================

[](#bearqueryrepository)

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/6936bd00b13f654c9a573481e21509fa8fb1553c055e6f7fed5e0649634e86fc/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6265617273756e6461792f424541522e51756572795265706f7369746f72792f6261646765732f7175616c6974792d73636f72652e706e673f623d312e78)](https://scrutinizer-ci.com/g/bearsunday/BEAR.QueryRepository/?branch=1.x)[![codecov](https://camo.githubusercontent.com/879939d042af20bab1b7ea747a5c8105262d1c1f30adab55152abaaf124a74b1/68747470733a2f2f636f6465636f762e696f2f67682f6265617273756e6461792f424541522e51756572795265706f7369746f72792f6272616e63682f312e782f67726170682f62616467652e7376673f746f6b656e3d65683363394146344d72)](https://codecov.io/gh/koriym/BEAR.QueryRepository)[![Type Coverage](https://camo.githubusercontent.com/132f9dab0b38e66e1d0958a6eb1ac88f1073eb097573d47649f2c3bf4685e9a9/68747470733a2f2f73686570686572642e6465762f6769746875622f6265617273756e6461792f424541522e51756572795265706f7369746f72792f636f7665726167652e737667)](https://shepherd.dev/github/bearsunday/BEAR.QueryRepository)[![Coding Standards](https://github.com/bearsunday/BEAR.QueryRepository/actions/workflows/coding-standards.yml/badge.svg)](https://github.com/bearsunday/BEAR.QueryRepository/actions/workflows/coding-standards.yml)[![Static Analysis](https://github.com/bearsunday/BEAR.QueryRepository/actions/workflows/static-analysis.yml/badge.svg)](https://github.com/bearsunday/BEAR.QueryRepository/actions/workflows/static-analysis.yml)[![Continuous Integration](https://github.com/bearsunday/BEAR.QueryRepository/actions/workflows/continuous-integration.yml/badge.svg)](https://github.com/bearsunday/BEAR.QueryRepository/actions/workflows/continuous-integration.yml)

**BEAR.QueryRepository** is a distributed caching framework for BEAR.Resource applications, inspired by [CQRS](http://martinfowler.com/bliki/CQRS.html). It segregates reads and writes into separate repositories to optimize performance and resource utilization.

Key Features
------------

[](#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 `ETag` and `304 Not Modified` responses.
- **Distributed Cache Support**: Works with server-side caches (e.g., Redis, APC), shared caches (e.g., CDNs), and client-side caches.

Documentation
-------------

[](#documentation)

- [BEAR.Sunday cache manual](http://bearsunday.github.io/manuals/1.0/ja/cache.html)
- [LLM Documentation](https://bearsunday.github.io/BEAR.QueryRepository/llms-full.txt)

###  Health Score

65

—

FairBetter than 99% of packages

Maintenance81

Actively maintained with recent releases

Popularity44

Moderate usage in the ecosystem

Community26

Small or concentrated contributor base

Maturity92

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 94.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~47 days

Recently: every ~22 days

Total

85

Last Release

101d ago

Major Versions

0.5.0 → 1.0.02015-05-19

PHP version history (9 changes)1.0.4PHP &gt;=5.5.0

1.2.0PHP ~5.6|~7.0

1.4.5PHP &gt;=7.0.0

1.6.5PHP &gt;=7.2

1.6.10PHP ^7.2 || ^8.0

1.8.5PHP ^7.4 || ^8.0

1.9.0PHP ^8.0

1.10.0PHP ^8.1

1.13.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/db4fc75ffc631168d0d7143b6f2c24b1534dfb921212bd851c026c5cbbb1344d?d=identicon)[koriym](/maintainers/koriym)

---

Top Contributors

[![koriym](https://avatars.githubusercontent.com/u/529021?v=4)](https://github.com/koriym "koriym (1056 commits)")[![jingu](https://avatars.githubusercontent.com/u/892913?v=4)](https://github.com/jingu "jingu (26 commits)")[![NaokiTsuchiya](https://avatars.githubusercontent.com/u/17171732?v=4)](https://github.com/NaokiTsuchiya "NaokiTsuchiya (15 commits)")[![momospnr](https://avatars.githubusercontent.com/u/1066913?v=4)](https://github.com/momospnr "momospnr (8 commits)")[![apple-x-co](https://avatars.githubusercontent.com/u/8497012?v=4)](https://github.com/apple-x-co "apple-x-co (4 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (4 commits)")[![kuma-guy](https://avatars.githubusercontent.com/u/7978290?v=4)](https://github.com/kuma-guy "kuma-guy (1 commits)")[![kawanamiyuu](https://avatars.githubusercontent.com/u/1461463?v=4)](https://github.com/kawanamiyuu "kawanamiyuu (1 commits)")[![kalibora](https://avatars.githubusercontent.com/u/434940?v=4)](https://github.com/kalibora "kalibora (1 commits)")[![suzumaze](https://avatars.githubusercontent.com/u/17695387?v=4)](https://github.com/suzumaze "suzumaze (1 commits)")

---

Tags

bearsundaybearsunday-modulecqrsphpcachingEtagevent-driven-contentdonut caching

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/bear-query-repository/health.svg)

```
[![Health](https://phpackages.com/badges/bear-query-repository/health.svg)](https://phpackages.com/packages/bear-query-repository)
```

###  Alternatives

[symfony/cache

Provides extended PSR-6, PSR-16 (and tags) implementations

4.2k348.9M2.5k](/packages/symfony-cache)[bear/package

BEAR.Sunday application framework package

30527.9k23](/packages/bear-package)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[tedivm/stash

The place to keep your cache.

9824.8M124](/packages/tedivm-stash)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.2M386](/packages/shopware-core)[webarchitect609/bitrix-cache

Comfortable fluent interface for Bitrix cache. Anti-stampede cache protection.

2831.2k8](/packages/webarchitect609-bitrix-cache)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
