summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2008-11-11 13:01:14 -0800
committerLuke Kanies <luke@madstop.com>2008-11-11 13:01:14 -0800
commit29b97943e7efaad3cb3f8e7b82004c067d3fbf82 (patch)
tree1abb306a834786f2681249c762c57dcd21ebd7bd /lib
parentcd09d6b90d3365d06e8e706aab3edbd8f568f1c9 (diff)
downloadpuppet-29b97943e7efaad3cb3f8e7b82004c067d3fbf82.tar.gz
puppet-29b97943e7efaad3cb3f8e7b82004c067d3fbf82.tar.xz
puppet-29b97943e7efaad3cb3f8e7b82004c067d3fbf82.zip
Allowing a nil expirer for caching classes.
If there's no expirer, then the value is regenerated every time. Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/puppet/util/cacher.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/puppet/util/cacher.rb b/lib/puppet/util/cacher.rb
index 0406b12f1..af5c5ebfc 100644
--- a/lib/puppet/util/cacher.rb
+++ b/lib/puppet/util/cacher.rb
@@ -70,7 +70,8 @@ module Puppet::Util::Cacher
end
def cached_value(name)
- if expirer.expired?(cache_timestamp)
+ # Allow a nil expirer, in which case we regenerate the value every time.
+ if expirer.nil? or expirer.expired?(cache_timestamp)
value_cache.clear
@cache_timestamp = Time.now
end