Setting the cache_store in an initializer

前端 未结 6 824
一向
一向 2020-12-05 10:38

I\'m trying to use redis-store 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

6条回答
  •  我在风中等你
    2020-12-05 11:14

    In the original setup you had, does it help if you change:

    MyApp::Application.config.cache_store = :redis_store, APP_CONFIG['redis'] 
    

    to:

    MyApp::Application.config.cache_store = :redis_store, APP_CONFIG['redis'] 
    RAILS_CACHE = MyApp::Application.config.cache_store
    

    ?

提交回复
热议问题