title: Setting the cache_store in an initializer
body: <p>I'm trying to use <a href="https://github.com/jodosha/redis-store" rel="noreferrer">redis-store</a> as my Rails 3 cache_store. I also have an initializer/app_config.rb which loads a yaml file for config settings. In my initializer/redis.rb I have: </p>
  
  <pre><code>MyApp::Application.config.cache_store = :redis_store, APP_CONFIG['redis'] 
  </code></pre>
  
  <p>However, this doesn't appear to work. If I do:</p>
  
  <pre><code>Rails.cache
  </code></pre>
  
  <p>in my rails console I can clearly see it's using the</p>
  
  <pre><code>ActiveSupport.Cache.FileStore
  </code></pre>
  
  <p>as the cache store instead of redis-store. However, if I add the config in my application.rb file like this:</p>
  
  <pre><code>config.cache_store = :redis_store 
  </code></pre>
  
  <p>it works just fine, except the app config initializer is loaded after application.rb, so I don't have access to APP_CONFIG.</p>
  
  <p>Has anyone experienced this? I can't seem to set a cache store in an initializer.</p>