diff options
| author | Nick Lewis <nick@puppetlabs.com> | 2011-07-21 11:37:06 -0700 |
|---|---|---|
| committer | Nick Lewis <nick@puppetlabs.com> | 2011-07-21 20:10:02 -0700 |
| commit | 6a1b65760a0d8c6299d5c6d260dc37b5e0637706 (patch) | |
| tree | baf82f2dcc01bdb98bdf5bf480318ad681790b66 /lib | |
| parent | 4bad729f56c26d8154cd0f20614fa4e478de9d40 (diff) | |
Remove use of Util::Cacher from FileServing::Mount::File
Allowing this value to be expirable is superfluous; it is only used on the
master, which never expires its cache. Additionally, it was providing partial
support for an event we don't fully support already (hostname and domain
changing during the lifetime of a master).
Reviewed-By: Jacob Helwig <jacob@puppetlabs.com>
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/puppet/file_serving/mount.rb | 1 | ||||
| -rw-r--r-- | lib/puppet/file_serving/mount/file.rb | 21 |
2 files changed, 9 insertions, 13 deletions
diff --git a/lib/puppet/file_serving/mount.rb b/lib/puppet/file_serving/mount.rb index 37dd89537..79290ab81 100644 --- a/lib/puppet/file_serving/mount.rb +++ b/lib/puppet/file_serving/mount.rb @@ -4,7 +4,6 @@ require 'puppet/network/authstore' require 'puppet/util/logging' -require 'puppet/util/cacher' require 'puppet/file_serving' require 'puppet/file_serving/metadata' require 'puppet/file_serving/content' diff --git a/lib/puppet/file_serving/mount/file.rb b/lib/puppet/file_serving/mount/file.rb index 7d622e4bf..7f5af7f52 100644 --- a/lib/puppet/file_serving/mount/file.rb +++ b/lib/puppet/file_serving/mount/file.rb @@ -1,18 +1,15 @@ -require 'puppet/util/cacher' - require 'puppet/file_serving/mount' class Puppet::FileServing::Mount::File < Puppet::FileServing::Mount - class << self - include Puppet::Util::Cacher - - cached_attr(:localmap) do - { "h" => Facter.value("hostname"), - "H" => [Facter.value("hostname"), - Facter.value("domain")].join("."), - "d" => Facter.value("domain") - } - end + def self.localmap + @localmap ||= { + "h" => Facter.value("hostname"), + "H" => [ + Facter.value("hostname"), + Facter.value("domain") + ].join("."), + "d" => Facter.value("domain") + } end def complete_path(relative_path, node) |
