Making Shopify’s Flagship App 20% Faster in 6 Weeks Using a Novel Caching Solution - Shopify
Sep 22, 2021

Summary
This post details the development of a custom write-through cache for the Shop app's home feed using Memcached. The solution addresses challenges with concurrent updates by implementing a pending writes key and a short-expiry key to manage cache validity. Active Record Concerns were used to integrate the caching logic transparently into the existing ORM. A phased rollout strategy was employed, including a period where cached and database data were compared to ensure correctness before global deployment.