Skip to content

Instantly share code, notes, and snippets.

@jjb
Created Nov 2, 2021
Embed
What would you like to do?
How to work with raw compressed cache data in Rails
raw = Rails.cache.redis.get( Rails.cache.redis.keys.first)
Marshal.load raw
Marshal.load(raw).instance_variable_get :@value
Zlib::Inflate.inflate Marshal.load(raw).instance_variable_get :@value
Marshal.load Zlib::Inflate.inflate Marshal.load(raw).instance_variable_get :@value
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment