<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Caching on RawCull</title><link>https://techrawcull.netlify.app/tags/caching/</link><description>Recent content in Caching on RawCull</description><generator>Hugo</generator><language>en</language><lastBuildDate>Fri, 04 Sep 2026 20:55:01 +0200</lastBuildDate><atom:link href="https://techrawcull.netlify.app/tags/caching/index.xml" rel="self" type="application/rss+xml"/><item><title>Image Pipeline and Caching</title><link>https://techrawcull.netlify.app/docs/copilot/02-image-pipeline-and-caching/</link><pubDate>Fri, 04 Sep 2026 00:00:00 +0000</pubDate><guid>https://techrawcull.netlify.app/docs/copilot/02-image-pipeline-and-caching/</guid><description>&lt;h1 id="image-pipeline-and-caching"&gt;Image Pipeline and Caching&lt;a class="td-heading-self-link" href="#image-pipeline-and-caching" aria-label="Heading self-link"&gt;&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;This is the path a RAW file takes from &amp;ldquo;user picked a folder&amp;rdquo; to &amp;ldquo;sharp
preview pixels on screen&amp;rdquo;, and the multi-layer cache system that keeps that
fast on repeat visits. Read
&lt;a href="../01-concurrency-architecture/"&gt;Concurrency Architecture&lt;/a&gt; first — this
document assumes you know the actor/TaskGroup/Sendable vocabulary from there.&lt;/p&gt;
&lt;h2 id="end-to-end-flow"&gt;End-to-end flow&lt;a class="td-heading-self-link" href="#end-to-end-flow" aria-label="Heading self-link"&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;User selects folder
 │
 ▼
DiscoverFiles (actor) ──► finds candidate RAW file URLs
 │
 ▼
ScanFiles (actor) ──► reads EXIF/metadata per file → [FileItem]
 │ (feeds RawCullViewModel.files)
 ▼
ScanAndCreateThumbnails (actor, background, low priority)
 │ proactively decodes + caches grid thumbnails
 ▼
 ┌─────────────────────────────┐
 │ SharedMemoryCache (RAM) │ ← only RequestThumbnail admits here
 │ DiskCacheManager (disk) │ ← both scan-preload and requests write here
 └─────────────────────────────┘
 ▲
 │ (user scrolls the grid / opens loupe)
 │
RequestThumbnail (actor) ──► coalesces duplicate concurrent requests,
 │ checks memory cache → disk cache → decode
 ▼
 CGImage/NSImage rendered by a SwiftUI Image/ThumbnailComponents view
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;For full-size zoom/export, a parallel path exists through
&lt;code&gt;ScanAndExtractJPGs&lt;/code&gt; / &lt;code&gt;ExtractAndSaveJPGs&lt;/code&gt; / &lt;code&gt;SaveJPGImage&lt;/code&gt;, backed by
&lt;code&gt;FullSizeJPGDiskCache&lt;/code&gt; instead of &lt;code&gt;DiskCacheManager&lt;/code&gt;.&lt;/p&gt;</description></item></channel></rss>