<?xml version="1.0" encoding="UTF-8"?>
<mxfile host="eli.ai" agent="eli.ai diagram exporter" version="1">
  <diagram id="semantic-cache-invalidation-0e271335" name="Semantic cache invalidation">
    <mxGraphModel dx="1600" dy="1200" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1600" pageHeight="1200" math="0" shadow="0">
      <root>
        <mxCell id="0"/>
        <object id="1" label="Semantic cache invalidation" schemaVersion="1" diagramId="semantic-cache-invalidation-0e271335" canonicalAppearanceKey="tsx:src/app/(docs)/docs/concepts/semantic-caching/page.tsx:invalidateChart#1" sourceSha256="0e2713353976dde3c1bc249df9771a5ae9d0542a83a060d996dd9a90076656ac" metadataPayloadSha256="c41082f5814662ef5807dd53384a0052b8dc71c5ab02d902bdfc0b0fed37575c" generationKey="43e9c5d9a5083b11572771809318d06150c8664da0d7b159329f36c39d93047c" concepts="[&quot;Semantic caching&quot;,&quot;Invalidate&quot;]" keywords="[&quot;lookup by doc_id&quot;,&quot;doc changed / deleted&quot;,&quot;docId, newHash&quot;,&quot;stored hash ≠ newHash?&quot;,&quot;tombstone entry&quot;,&quot;keep entry&quot;,&quot;ingestion · connector · vault&quot;,&quot;cacheInvalidateOnDocChange(ws, docId, newHash)&quot;,&quot;enqueue cacheInvalidate {docId, newHash}&quot;,&quot;invalidation_reason&quot;,&quot;semantic_cache_dependencies&quot;,&quot;yes&quot;,&quot;unchanged&quot;,&quot;processCacheInvalidation&quot;]" application="{&quot;name&quot;:&quot;eli-ai&quot;,&quot;version&quot;:&quot;0.1.0&quot;}" packages="{&quot;mermaid&quot;:&quot;11.16.0&quot;,&quot;mermaidCli&quot;:&quot;11.16.0&quot;,&quot;playwright&quot;:&quot;1.62.1&quot;,&quot;playwrightCore&quot;:&quot;1.62.1&quot;,&quot;puppeteer&quot;:&quot;25.6.0&quot;,&quot;puppeteerCore&quot;:&quot;25.6.0&quot;}" environment="{&quot;architecture&quot;:&quot;x64&quot;,&quot;containerImage&quot;:&quot;playwright:v1.62.1-noble@sha256:c091b21d9fae78c76e85cd4356431e9b018402f172a214fc7d7a5e9a7e29d8ac+node:26.3.1-bookworm-slim@sha256:209558c3e5e40e8adff68959d3c2ba7cd73723e716d89196878a0c362fa1e109&quot;,&quot;node&quot;:&quot;v26.3.1&quot;,&quot;platform&quot;:&quot;linux&quot;,&quot;yarn&quot;:&quot;4.17.1&quot;}" renderer="{&quot;browser&quot;:{&quot;executableSha256&quot;:&quot;0b20b130e7edd9dd51873be867761295fe0cfad490c2b9a64f95bd3cfc08fa71&quot;,&quot;name&quot;:&quot;chromium&quot;,&quot;revision&quot;:&quot;1234&quot;,&quot;version&quot;:&quot;151.0.7922.34&quot;},&quot;font&quot;:{&quot;family&quot;:&quot;Eli Diagram Inter Variable&quot;,&quot;fileSha256&quot;:&quot;3100e775e8616cd2611beecfa23a4263d7037586789b43f035236a2e6fbd4c62&quot;,&quot;licenseSha256&quot;:&quot;3b0a5fca3d17942cde889069889dedbbbd075e9b599968c82a95f4d944e9b345&quot;},&quot;mermaidConfigSha256&quot;:&quot;68c10966fe84406ee626034d58bfabd555df9f65f691204b7c46db24038da101&quot;,&quot;themeCssSha256&quot;:&quot;c80287a78d80ad63d27bd5ca348b2ef9a7e2f44da289e436be6484ea28a1b033&quot;}" adapterVersions="{&quot;diagramGenerator&quot;:&quot;2&quot;,&quot;drawioFlowchart&quot;:&quot;1&quot;,&quot;drawioGantt&quot;:&quot;1&quot;,&quot;drawioSequence&quot;:&quot;1&quot;,&quot;drawioState&quot;:&quot;1&quot;}" mermaidType="flowchart" direction="LR" generatedAt="2026-08-12T23:42:06.867Z" mermaidSource="flowchart LR&#10;  Change[&quot;doc changed / deleted&lt;br/&gt;(ingestion · connector · vault)&quot;] --&gt; Hook[&quot;cacheInvalidateOnDocChange(ws, docId, newHash)&quot;]&#10;  Hook --&gt; Q[&quot;enqueue cacheInvalidate {docId, newHash}&quot;]&#10;  Q --&gt; Worker[&quot;processCacheInvalidation&quot;]&#10;  Worker --&gt; Dep[(&quot;semantic_cache_dependencies&lt;br/&gt;lookup by doc_id&quot;)]&#10;  Dep --&gt; Cmp{&quot;stored hash ≠ newHash?&quot;}&#10;  Cmp --&gt;|&quot;yes&quot;| Kill[&quot;tombstone entry&lt;br/&gt;+ invalidation_reason&quot;]&#10;  Cmp --&gt;|&quot;unchanged&quot;| Keep[&quot;keep entry&quot;]">
          <mxCell parent="0"/>
        </object>
        <object id="n:Change" label="doc changed / deleted(ingestion · connector · vault)" mermaidId="Change" mermaidShape="rectangle">
          <mxCell parent="1" vertex="1" style="fillColor=#ECECFF;fontColor=#333333;html=1;rounded=0;strokeColor=#9370DB;whiteSpace=wrap;">
            <mxGeometry x="8" y="76.59375" width="256" height="100" as="geometry"/>
          </mxCell>
        </object>
        <object id="n:Hook" label="cacheInvalidateOnDocChange(ws, docId, newHash)" mermaidId="Hook" mermaidShape="rectangle">
          <mxCell parent="1" vertex="1" style="fillColor=#ECECFF;fontColor=#333333;html=1;rounded=0;strokeColor=#9370DB;whiteSpace=wrap;">
            <mxGeometry x="314" y="88.59375" width="321.75" height="76" as="geometry"/>
          </mxCell>
        </object>
        <object id="n:Q" label="enqueue cacheInvalidate {docId, newHash}" mermaidId="Q" mermaidShape="rectangle">
          <mxCell parent="1" vertex="1" style="fillColor=#ECECFF;fontColor=#333333;html=1;rounded=0;strokeColor=#9370DB;whiteSpace=wrap;">
            <mxGeometry x="685.75" y="88.59375" width="256" height="76" as="geometry"/>
          </mxCell>
        </object>
        <object id="n:Worker" label="processCacheInvalidation" mermaidId="Worker" mermaidShape="rectangle">
          <mxCell parent="1" vertex="1" style="fillColor=#ECECFF;fontColor=#333333;html=1;rounded=0;strokeColor=#9370DB;whiteSpace=wrap;">
            <mxGeometry x="991.75" y="100.59375" width="251.21875" height="52" as="geometry"/>
          </mxCell>
        </object>
        <object id="n:Dep" label="semantic_cache_dependencieslookup by doc_id" mermaidId="Dep" mermaidShape="cylinder">
          <mxCell parent="1" vertex="1" style="backgroundOutline=1;boundedLbl=1;fillColor=#ECECFF;fontColor=#333333;html=1;shape=cylinder3;size=15;strokeColor=#9370DB;whiteSpace=wrap;">
            <mxGeometry x="1292.96875" y="70.581782" width="250.359375" height="112.023935" as="geometry"/>
          </mxCell>
        </object>
        <object id="n:Cmp" label="stored hash ≠ newHash?" mermaidId="Cmp" mermaidShape="diamond">
          <mxCell parent="1" vertex="1" style="fillColor=#ECECFF;fontColor=#333333;html=1;perimeter=rhombusPerimeter;shape=rhombus;strokeColor=#9370DB;whiteSpace=wrap;">
            <mxGeometry x="1593.828125" y="8" width="237.1875" height="237.1875" as="geometry"/>
          </mxCell>
        </object>
        <object id="n:Kill" label="tombstone entry+ invalidation_reason" mermaidId="Kill" mermaidShape="rectangle">
          <mxCell parent="1" vertex="1" style="fillColor=#ECECFF;fontColor=#333333;html=1;rounded=0;strokeColor=#9370DB;whiteSpace=wrap;">
            <mxGeometry x="1965.40625" y="31.59375" width="216.328125" height="76" as="geometry"/>
          </mxCell>
        </object>
        <object id="n:Keep" label="keep entry" mermaidId="Keep" mermaidShape="rectangle">
          <mxCell parent="1" vertex="1" style="fillColor=#ECECFF;fontColor=#333333;html=1;rounded=0;strokeColor=#9370DB;whiteSpace=wrap;">
            <mxGeometry x="2005.242188" y="157.59375" width="136.65625" height="52" as="geometry"/>
          </mxCell>
        </object>
        <object id="e:L_Change_Hook_0" label="" mermaidId="L_Change_Hook_0" mermaidKind="relationship">
          <mxCell parent="1" source="n:Change" target="n:Hook" edge="1" style="edgeStyle=orthogonalEdgeStyle;endArrow=block;endFill=1;html=1;jettySize=auto;orthogonalLoop=1;rounded=0;strokeColor=#333333;">
            <mxGeometry relative="1" as="geometry">
              <mxPoint x="264" y="126.59375" as="sourcePoint"/>
              <mxPoint x="314" y="126.59375" as="targetPoint"/>
              <Array as="points">
                <mxPoint x="289" y="126.59375"/>
              </Array>
            </mxGeometry>
          </mxCell>
        </object>
        <object id="e:L_Hook_Q_0" label="" mermaidId="L_Hook_Q_0" mermaidKind="relationship">
          <mxCell parent="1" source="n:Hook" target="n:Q" edge="1" style="edgeStyle=orthogonalEdgeStyle;endArrow=block;endFill=1;html=1;jettySize=auto;orthogonalLoop=1;rounded=0;strokeColor=#333333;">
            <mxGeometry relative="1" as="geometry">
              <mxPoint x="635.75" y="126.59375" as="sourcePoint"/>
              <mxPoint x="685.75" y="126.59375" as="targetPoint"/>
              <Array as="points">
                <mxPoint x="660.75" y="126.59375"/>
              </Array>
            </mxGeometry>
          </mxCell>
        </object>
        <object id="e:L_Q_Worker_0" label="" mermaidId="L_Q_Worker_0" mermaidKind="relationship">
          <mxCell parent="1" source="n:Q" target="n:Worker" edge="1" style="edgeStyle=orthogonalEdgeStyle;endArrow=block;endFill=1;html=1;jettySize=auto;orthogonalLoop=1;rounded=0;strokeColor=#333333;">
            <mxGeometry relative="1" as="geometry">
              <mxPoint x="941.75" y="126.59375" as="sourcePoint"/>
              <mxPoint x="991.75" y="126.59375" as="targetPoint"/>
              <Array as="points">
                <mxPoint x="966.75" y="126.59375"/>
              </Array>
            </mxGeometry>
          </mxCell>
        </object>
        <object id="e:L_Worker_Dep_0" label="" mermaidId="L_Worker_Dep_0" mermaidKind="relationship">
          <mxCell parent="1" source="n:Worker" target="n:Dep" edge="1" style="edgeStyle=orthogonalEdgeStyle;endArrow=block;endFill=1;html=1;jettySize=auto;orthogonalLoop=1;rounded=0;strokeColor=#333333;">
            <mxGeometry relative="1" as="geometry">
              <mxPoint x="1242.96875" y="126.59375" as="sourcePoint"/>
              <mxPoint x="1292.96875" y="126.59375" as="targetPoint"/>
              <Array as="points">
                <mxPoint x="1267.96875" y="126.59375"/>
              </Array>
            </mxGeometry>
          </mxCell>
        </object>
        <object id="e:L_Dep_Cmp_0" label="" mermaidId="L_Dep_Cmp_0" mermaidKind="relationship">
          <mxCell parent="1" source="n:Dep" target="n:Cmp" edge="1" style="edgeStyle=orthogonalEdgeStyle;endArrow=block;endFill=1;html=1;jettySize=auto;orthogonalLoop=1;rounded=0;strokeColor=#333333;">
            <mxGeometry relative="1" as="geometry">
              <mxPoint x="1543.328125" y="126.59375" as="sourcePoint"/>
              <mxPoint x="1593.328125" y="126.59375" as="targetPoint"/>
              <Array as="points">
                <mxPoint x="1568.328125" y="126.59375"/>
              </Array>
            </mxGeometry>
          </mxCell>
        </object>
        <object id="e:L_Cmp_Kill_0" label="yes" mermaidId="L_Cmp_Kill_0" mermaidKind="relationship">
          <mxCell parent="1" source="n:Cmp" target="n:Kill" edge="1" style="edgeStyle=orthogonalEdgeStyle;endArrow=block;endFill=1;html=1;jettySize=auto;orthogonalLoop=1;rounded=0;strokeColor=#333333;">
            <mxGeometry relative="1" as="geometry">
              <mxPoint x="1802.701809" y="98.779934" as="sourcePoint"/>
              <mxPoint x="1965.40625" y="69.59375" as="targetPoint"/>
              <Array as="points">
                <mxPoint x="1897.960938" y="69.59375"/>
              </Array>
            </mxGeometry>
          </mxCell>
        </object>
        <object id="e:L_Cmp_Keep_0" label="unchanged" mermaidId="L_Cmp_Keep_0" mermaidKind="relationship">
          <mxCell parent="1" source="n:Cmp" target="n:Keep" edge="1" style="edgeStyle=orthogonalEdgeStyle;endArrow=block;endFill=1;html=1;jettySize=auto;orthogonalLoop=1;rounded=0;strokeColor=#333333;">
            <mxGeometry relative="1" as="geometry">
              <mxPoint x="1802.701809" y="154.407566" as="sourcePoint"/>
              <mxPoint x="2005.242188" y="183.59375" as="targetPoint"/>
              <Array as="points">
                <mxPoint x="1897.960938" y="183.59375"/>
              </Array>
            </mxGeometry>
          </mxCell>
        </object>
      </root>
    </mxGraphModel>
  </diagram>
</mxfile>
