Project

cache_pipe

0.0
No commit activity in last 3 years
No release in over 3 years
Provides a wrapper around a Rails cache store, allowing values to be transformed before storage and after retrieval.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

= 3.0.0
 Project Readme

cache_pipe

Provides a wrapper around a Rails cache store, allowing values to be transformed before storage and after retrieval.

Currently it provides a single transformation, :wrap_nil, which allows caching engines like Dalli to store nil values.

Usage

Add to your Gemfile:

gem 'cache_pipe'

Then change your Rails configuration, e.g. config/environments/production.rb:

config.cache_store = :cache_pipe, :wrap_nil, :dalli_store, { value_max_bytes: 10485760, expires_in: 86400 }
# Instead of config.cache_store = :dalli_store, { value_max_bytes: 10485760, expires_in: 86400 }

TODO

In the future, we may want to support additional transformations. Let me know if you have other applications that aren't covered by the current implementation!