# Caching Without Marshal Part 1: Marshal from the Inside Out

DevFeed: [Caching Without Marshal Part 1: Marshal from the Inside Out](<https://devfeed.tech/articles/caching-without-marshal-part-1-marshal-from-the-inside-out-1337.md>)

Original publisher: [Read original article](<https://shopify.engineering/caching-without-marshal-part-one>)

Author: Chris Salzberg

Published: 2022-11-11T15:30: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>), [Cache](<https://devfeed.tech/topics/cache.md>), [Rails](<https://devfeed.tech/topics/rails.md>), [Ruby](<https://devfeed.tech/topics/ruby.md>), [Shopify](<https://devfeed.tech/topics/shopify.md>), [incident](<https://devfeed.tech/topics/incident.md>), [Refactoring](<https://devfeed.tech/topics/refactoring.md>), [ci](<https://devfeed.tech/topics/ci.md>)

Tags: [cache](<https://devfeed.tech/tags/cache.md>), [caching](<https://devfeed.tech/tags/caching.md>), [ci](<https://devfeed.tech/tags/ci.md>), [core](<https://devfeed.tech/tags/core.md>), [incident](<https://devfeed.tech/tags/incident.md>), [refactoring](<https://devfeed.tech/tags/refactoring.md>), [ruby](<https://devfeed.tech/tags/ruby.md>), [shopify](<https://devfeed.tech/tags/shopify.md>)

## AI overview

Shopify's Caching Without Marshal Part 1 explains how Ruby's Marshal serialization supports Rails caching but can make deployments fragile. A refactoring of classes used by cached beta flags caused old and new application versions to disagree about serialized class names and methods, triggering production exceptions. The article introduces the motivation for developing a cache format that remains safe across code changes.

## Source excerpt

Shopify wanted a cache format that would not blow up when we shipped code changes. Part one of Caching Without Marshal describes Marshal, Ruby's ultimate sharp knife, able to transform almost any object into a binary blob and back.