<?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 Brian Faust</title><link>https://vacua.dev/tags/caching/</link><description>Recent content in Caching on Brian Faust</description><generator>Hugo</generator><language>en-US</language><lastBuildDate>Mon, 01 Jan 0001 00:00:00 +0000</lastBuildDate><atom:link href="https://vacua.dev/tags/caching/rss.xml" rel="self" type="application/rss+xml"/><item><title>A Cache Hit Is Not a Freshness Guarantee</title><link>https://vacua.dev/a-cache-hit-is-not-a-freshness-guarantee/</link><pubDate>Tue, 01 Apr 2025 00:00:00 +0000</pubDate><guid>https://vacua.dev/a-cache-hit-is-not-a-freshness-guarantee/</guid><description>&lt;p&gt;A catalogue price is cached at revision 1. The database commits revision 2.
Three seconds later, Laravel finds the key and returns revision 1 from inside
its declared five-second fresh window.&lt;/p&gt;
&lt;p&gt;The cache hit is real. So is the stale price.&lt;/p&gt;
&lt;p&gt;In the &lt;a href="https://vacua.dev/reproductions/lar-06/"&gt;LAR-06 fixture&lt;/a&gt;
, the cached JSON is well formed and its
SHA-256 hash matches its body. Nothing has expired or become corrupt. The
failure is semantic: &lt;code&gt;current-price&lt;/code&gt; requires the acknowledged source
revision, while the cache only knows that a key still contains bytes.&lt;/p&gt;</description></item><item><title>Cache the Deployment, Not the Assumption</title><link>https://vacua.dev/cache-the-deployment-not-the-assumption/</link><pubDate>Sun, 01 Dec 2024 00:00:00 +0000</pubDate><guid>https://vacua.dev/cache-the-deployment-not-the-assumption/</guid><description>&lt;p&gt;Release B serves &lt;code&gt;/inventory&lt;/code&gt; and labels its catalogue &lt;code&gt;green&lt;/code&gt;. The code is
correct. The environment is correct. Yet the application answers &lt;code&gt;/catalogue&lt;/code&gt;
with &lt;code&gt;blue&lt;/code&gt;, while &lt;code&gt;/inventory&lt;/code&gt; returns &lt;code&gt;404&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Nothing corrupted Laravel&amp;rsquo;s generated files. They contain release A&amp;rsquo;s
configuration and route table because release A created them. The deployment
combined those files with release B and produced a system which is consistently
wrong.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;config:cache&lt;/code&gt; and &lt;code&gt;route:cache&lt;/code&gt; are often introduced as performance switches.
That description misses their more important property: each command turns a
set of inputs into a generated artifact. If the artifact is deployed, it must
carry the same release identity as the code and environment which produced it.&lt;/p&gt;</description></item></channel></rss>