
bearsunday/bear.queryrepository
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
リソースクエリの責任の分離(RQRS)は、BEARのキャッシュフレームワークです。 クエリとコマンドの責任を分離することでパフォーマンスを最適化する日曜日.
概要
BEARのCQRSスタイルの読み取り側。 日曜日: キャッシュ可能な GET の結果は読み取りモデルとして保存されます。 見逃すと、onGet は 1 つをオンデマンドでビルドします。 変更するコマンドはリフレッシュするか、それをパージします。 リソースは属性と AOP でこれを宣言します。残りの部分 - 保存、条件付きリクエストの応答、無効化を行います。 デフォルトでは、書き込みが無効になるまでエントリが命じます。 TTL は、単にストールに行くことができるデータに利用できます。 - : #[Embed] で取られたキャッシュされた子は、親の依存性になります。 - : コマンド (onPut, onPatch, ...) は、 #[Purge], #[Refresh] や #[RefreshCache] で変更されたものを無効化します。 - : 元のキャッシュ、304 Not Changeの背後にあるETagプール、およびCDNのSurrogate-Keyは同じタグによって無効化されます。 - : ユーザホール(#[DonutCache])、イベントで再構築された穴(#[CacheableResponse])、およびページが読み込まれる材料。 - : 各店舗、ヒット、依存性、無効のセマンティックログレコード.
概要(AI 翻訳)
クエリ側のリポジトリ:現在のキャッシュを残さない書き込みの既読モデル。
BEARのCQRSスタイルの読み取り側。 日曜日: キャッシュ可能な GET の結果は読み取りモデルとして保存されます。 見逃して、[onGet]は、要求に応じて1つをビルドします。 変更するコマンドは、リフレッシュするか、それをパージします。 リソースは属性と AOP でこれを宣言します。残りの部分 - 保存、条件付きリクエストの応答、無効化を行います。 デフォルトでは、書き込みが無効になるまでエントリが命じます。 TTL は、単にストールに行くことができるデータに利用できます。
-リソースグラフは依存グラフ:[#[Embed]で取り込まれたキャッシュされた子は、親の依存性になります。
- Writes disabledate: コマンド ([
onPut]), [[onPatch]], [#[Refresh]]], [[#[RefreshCache]]]), ではなく、有効期限を待ちます。 - 1つのタグは、すべてのレイヤーを横断します: 元のキャッシュ,
304 Not Modifiedの背後にあるETagプール, CDNの[Surrogate-Key]]は、同じタグで無効になっています. - 子の3つの使用:パーユーザホール([
#[DonutCache])、イベントで再構築された穴([#[CacheableResponse])、およびページが読み込まれる材料.
このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。
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’sSurrogate-Keyare 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
推奨ツール
別のキーワードを試すか、フィルタを外してください。
インストール
npx skillfish add bearsunday/bear.queryrepository