# IdentityCache: Improving Performance one Cached Model at a Time

DevFeed: [IdentityCache: Improving Performance one Cached Model at a Time](<https://devfeed.tech/articles/identitycache-improving-performance-one-cached-model-at-a-time-1437.md>)

Original publisher: [Read original article](<https://shopify.engineering/identitycache-improving-performance-one-cached-model-at-a-time>)

Author: Camilo Lopez

Published: 2013-04-04T13:24:00Z

Content type: article

Language: en

Sources: [Shopify Engineering](<https://devfeed.tech/sources/shopify-engineering.md>), [Shopify Engineering - Shopify Engineering](<https://devfeed.tech/sources/shopify-engineering-shopify-engineering.md>)

Topics: [Caching](<https://devfeed.tech/topics/caching.md>), [Shopify](<https://devfeed.tech/topics/shopify.md>), [Database](<https://devfeed.tech/topics/database.md>), [Library](<https://devfeed.tech/topics/library.md>), [web applications](<https://devfeed.tech/topics/web-applications.md>)

Tags: [activerecord](<https://devfeed.tech/tags/activerecord.md>), [caching](<https://devfeed.tech/tags/caching.md>), [database](<https://devfeed.tech/tags/database.md>), [database-performance](<https://devfeed.tech/tags/database-performance.md>), [library](<https://devfeed.tech/tags/library.md>), [performance](<https://devfeed.tech/tags/performance.md>), [shopify](<https://devfeed.tech/tags/shopify.md>)

## AI overview

Shopify open-sources IdentityCache, an internal library that caches ActiveRecord models in Memcached. The article explains how moving database reads to the cache improved performance and resilience as traffic and write-heavy sales events increased.

## Source excerpt

A month ago Shopify was at BigRubyConf where we mentioned an internal library we use for caching ActiveRecord models called IdentityCache. We're pleased to say that the library has been extracted out of the Shopify code base and has been open sourced! At Shopify, our core application has been database performance bound for much of our platform's history. That means that the most straightforward way of making Shopify more performant and resilient is to move work out of the database layer.