summaryrefslogtreecommitdiffstats
path: root/lib/puppet
diff options
context:
space:
mode:
authorNick Lewis <nick@puppetlabs.com>2011-07-21 11:37:06 -0700
committerJacob Helwig <jacob@puppetlabs.com>2011-08-19 13:52:55 -0700
commit41425bd7b23e1883b46ac7029232a388318e0df6 (patch)
tree8d1b23cd3c8e29ad6028a24cf1c877d0e482b48d /lib/puppet
parent8d530906490d5e2fafadd60a7f1699ef1d37b211 (diff)
downloadpuppet-41425bd7b23e1883b46ac7029232a388318e0df6.tar.gz
puppet-41425bd7b23e1883b46ac7029232a388318e0df6.tar.xz
puppet-41425bd7b23e1883b46ac7029232a388318e0df6.zip
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> (cherry picked from commit 6a1b65760a0d8c6299d5c6d260dc37b5e0637706)
Diffstat (limited to 'lib/puppet')
-rw-r--r--lib/puppet/file_serving/mount.rb1
-rw-r--r--lib/puppet/file_serving/mount/file.rb21
2 files changed, 9 insertions, 13 deletions
diff --git a/lib/puppet/file_serving/mount.rb b/lib/puppet/file_serving/mount.rb
index 130d6aeb7..da7102fd8 100644
--- a/lib/puppet/file_serving/mount.rb
+++ b/lib/puppet/file_serving/mount.rb
@@ -1,6 +1,5 @@
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)