<?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 vnykmshr</title><link>https://blog.vnykmshr.com/writing/tags/caching/</link><description>Recent content in Caching on vnykmshr</description><generator>Hugo</generator><language>en</language><lastBuildDate>Thu, 20 Jun 2024 00:00:00 +0000</lastBuildDate><atom:link href="https://blog.vnykmshr.com/writing/tags/caching/index.xml" rel="self" type="application/rss+xml"/><item><title>Redis caching patterns</title><link>https://blog.vnykmshr.com/writing/redis-caching-patterns/</link><pubDate>Thu, 20 Jun 2024 00:00:00 +0000</pubDate><guid>https://blog.vnykmshr.com/writing/redis-caching-patterns/</guid><description>&lt;p&gt;Put Redis in front of a database and reads get fast. The cost is a cache layer that&amp;rsquo;s now load-bearing, and a set of failure modes that come with that.&lt;/p&gt;
&lt;p&gt;Three write patterns, three hard problems. The patterns determine consistency. The problems determine whether your cache layer is a net positive or a source of outages.&lt;/p&gt;
&lt;h2 id="write-patterns"&gt;Write patterns&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Cache-aside&lt;/strong&gt; (lazy loading). The application checks cache on read. On miss, it reads from the database and populates cache. Writes go directly to the database; cache entries are either invalidated or left to expire.&lt;/p&gt;</description></item></channel></rss>