<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Cache on RawCull</title><link>https://rawcull.netlify.app/tags/cache/</link><description>Recent content in Cache on RawCull</description><generator>Hugo</generator><language>en</language><lastBuildDate>Wed, 25 Mar 2026 20:11:51 +0100</lastBuildDate><atom:link href="https://rawcull.netlify.app/tags/cache/index.xml" rel="self" type="application/rss+xml"/><item><title>Memory Cache</title><link>https://rawcull.netlify.app/blog/2026/03/17/memory-cache/</link><pubDate>Tue, 17 Mar 2026 00:00:00 +0000</pubDate><guid>https://rawcull.netlify.app/blog/2026/03/17/memory-cache/</guid><description>&lt;h1 id="cache-system--rawcull"&gt;Cache System — RawCull&lt;a class="td-heading-self-link" href="#cache-system--rawcull" aria-label="Heading self-link"&gt;&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;RawCull uses a three-layer cache to avoid repeated RAW decoding. Decoding an ARW file on demand is expensive — the three-layer approach ensures that most requests are served from RAM or disk rather than from source.&lt;/p&gt;
&lt;p&gt;Layers (fastest to slowest):&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Memory cache&lt;/strong&gt; — &lt;code&gt;NSCache&amp;lt;NSURL, DiscardableThumbnail&amp;gt;&lt;/code&gt; in RAM&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Disk cache&lt;/strong&gt; — JPEG files on disk in &lt;code&gt;~/Library/Caches/no.blogspot.RawCull/Thumbnails/&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Source decode&lt;/strong&gt; — &lt;code&gt;CGImageSourceCreateThumbnailAtIndex&lt;/code&gt; from the ARW file&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The same cache stack is shared by two paths: the bulk preload flow (&lt;code&gt;ScanAndCreateThumbnails&lt;/code&gt;) and on-demand per-file requests (&lt;code&gt;RequestThumbnail&lt;/code&gt;).&lt;/p&gt;</description></item></channel></rss>