Permalink
Browse files

Cache the YML config to avoid multiple file reads.

  • Loading branch information...
1 parent e2bd477 commit 02f9abf1ccae377a95fcb01da18d924b5ff46310 @dbalatero dbalatero committed Feb 23, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/asset_sync/config.rb
View
@@ -71,7 +71,7 @@ def yml_exists?
end
def yml
- y ||= YAML.load(ERB.new(IO.read(yml_path)).result)[Rails.env] rescue nil || {}
+ @yml ||= YAML.load(ERB.new(IO.read(yml_path)).result)[Rails.env] rescue nil || {}
end
def yml_path

0 comments on commit 02f9abf

Please sign in to comment.