2009年8月25日火曜日

[Rails][CodeReading] Rails::Initializer (13) initialize_framework_caches

Initializer.process で13番目に呼ばれる initialize_framework_caches メソッド。

def initialize_framework_caches
if configuration.frameworks.include?(:action_controller)
ActionController::Base.cache_store ||= RAILS_CACHE
end
end

コードに書いてある通り、なにも付け加えることはありません。
ActionControllerを使用する場合は、chache_store に RAILS_CACHE (デフォルトはActiveSupport::Cache::MomoryStore) をセットしています。

[Rails][CodeReading] Railsの初期化コードを読む (イントロ&目次)

0 件のコメント:

コメントを投稿