This patch provides a NullStore implementation of ActiveSupport::Cache::Store suitable for use in development and test environments where the code needs to use the cache interface, but actually caching data is not desired.
The cache store will never store data itself. It does implement the LocalCache strategy which will store values for the duration of a request to match the behavior of other cache implementations used in production environments.
It would be used then in the development.rb, for example, as:
config.cache_store = :null
(Note: this request was originally opened in Lighthouse at https://rails.lighthouseapp.com/projects/8994/tickets/6128)
Add ActiveSupport::Cache::NullStore to expose caching interface witho…
…ut actually caching for development and test environments.
Merge pull request #3954 from bdurand/null_store_2
Add ActiveSupport::Cache::NullStore for testing and development
Merged, thanks a lot.