Permalink
Browse files

Significant speedup to the Facter factsource by calling Facter.to_has…

…h less
  • Loading branch information...
1 parent 4ad3ad5 commit 4170d5ff935faa8991ca5789b4c8befecfdc138a @ripienaar ripienaar committed Sep 19, 2010
Showing with 3 additions and 1 deletion.
  1. +3 −1 facts/facter/facter.rb
View
@@ -35,12 +35,14 @@ def get_facts
@@last_facts_load = Time.now.to_i
logger.debug("Resetting facter cache after #{cache_time} seconds")
::Facter.reset
+
+ @@facts = ::Facter.to_hash
end
rescue
@@last_facts_load = Time.now.to_i
end
- ::Facter.to_hash
+ @@facts
end
end
end

0 comments on commit 4170d5f

Please sign in to comment.