BB

bearsunday/bear.queryrepository

Developer tools

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

6 stars 품질 51 트렌드 34MIT

Resource Query Responsibility Segregation (RQRS) is a caching framework for BEAR.Sunday that optimizes performance by separating query and command responsibilities.

개요

A CQRS-style read side for BEAR.Sunday: the results of cacheable GETs are kept as read models. On a miss, onGet builds one on demand; the commands that change it refresh or purge it. A resource declares this with attributes and AOP does the rest - storing, answering conditional requests, and invalidating. By default an entry lives until a write invalidates it; a TTL is available for data that may simply go stale. - : a cached child taken in with #[Embed] becomes a dependency of the parent. - : a command (onPut, onPatch, ...) invalidates what it changes with #[Purge], #[Refresh] or #[RefreshCache], rather than waiting for expiry. - : the origin cache, the ETag pool behind 304 Not Modified, and the CDN's Surrogate-Key are invalidated by the same tags. - : a per-user hole (#[DonutCache]), a hole rebuilt on events (#[CacheableResponse]), and material the page reads. - : the semantic log records each store, hit, dependency and invalidation.

README

원문 README의 일부입니다. 원문 보기.

BEAR.QueryRepository

The repository of the query side: a read model that writes keep current, not a cache left to expire.

A CQRS-style read side for BEAR.Sunday: the results of cacheable GETs are kept as read models. On a miss, onGet builds one on demand; the commands that change it refresh or purge it. A resource declares this with attributes and AOP does the rest - storing, answering conditional requests, and invalidating. By default an entry lives until a write invalidates it; a TTL is available for data that may simply go stale.

  • The resource graph is the dependency graph: a cached child taken in with #[Embed] becomes a dependency of the parent.
  • Writes invalidate: a command (onPut, onPatch, …) invalidates what it changes with #[Purge], #[Refresh] or #[RefreshCache], rather than waiting for expiry.
  • One tag crosses every layer: the origin cache, the ETag pool behind 304 Not Modified, and the CDN’s Surrogate-Key are invalidated by the same tags.
  • Three uses of a child: a per-user hole (#[DonutCache]), a hole rebuilt on events (#[CacheableResponse]), and material the page reads.
  • Verifiable: the semantic log records each store, hit, dependency and invalidation.

A cache attribute declares the response shared with every visitor: put per-user values in a non-cacheable #[DonutCache] hole.

Documentation

  • Cache manual: English / 日本語
  • Reading the Log (en / ja): every word the log can contain, and how to read a session
  • Why the Log Records Everything (en / ja): the design rationale, the cost measurements, and why recording is off by default
  • What the Log Proves (en / ja): the questions the log answers, and its declared boundaries
  • LLM documentation
GitHub에서 전체 README 보기

추천 도구

다른 키워드를 입력하거나 필터를 제거해 보세요.

설치

npx skillfish add bearsunday/bear.queryrepository
MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →