• second_level_cache 简介 at 2015年12月07日

    最近在学习用 Padrino 0.13 ruby 2.2 ActiveRecord 4.2

    config/root.rb

    #initialize redis and ActiveRecord Cache
    CACHE = ActiveSupport::Cache::RedisStore.new :host => "127.0.0.1", :driver => :hiredis, :expires_in => 1.week
    CACHE.logger = logger
    
    SecondLevelCache.configure do |config|
      config.cache_store = CACHE
      config.logger = logger
      config.cache_key_prefix = ''
    end
    

    config/database.rb

    ActiveRecord::Base.raise_in_transactional_callbacks = false
    

    在测试环境中运行

    thin start
    

    都会出现以下警告信息

    You can opt into the new behavior and remove this warning by setting:
    
      config.active_record.raise_in_transactional_callbacks = true
    
    

    请问如何才能去掉这个警告信息~