2 ms·
I love this hack. We're using it a lot at our company. exemple: if ENV["NO_REDIS_CACHE"] config.cache_store = :null_store else config.cache_stor
by mickeyben 14y ago
I love this hack. We're using it a lot at our company.
exemple:
if ENV["NO_REDIS_CACHE"]
config.cache_store = :null_store
else
config.cache_store = :redis_store
end
- jherdman 14y agoThat's kind of interesting. One would think the :null_store would only be useful in some environments, and not as something you may want, for example, in production. In what capacity are you using this?
- mickeyben 14y agoWe're using this in development, staging and test. But only in some circonstances. In development if we need to try something without cache, and in staging and tests for some tests runner (integration tests, QA crawlers, ...).