From fd7332be5ca8ba78ff24a455fddad1713be779b5 Mon Sep 17 00:00:00 2001 From: Daniel Pittman Date: Thu, 18 Aug 2011 11:27:41 -0700 Subject: maint: remove inaccurate copyright and license statements. For a while Luke, and other authors, injected a created tag, copyright statement, and "All rights reserved" into every new file they added to the Puppet project. This isn't really true, and we have a global license covering the code, so we have now stripped out all those old tags. Signed-off-by: Daniel Pittman --- spec/integration/node/facts_spec.rb | 4 ---- 1 file changed, 4 deletions(-) (limited to 'spec/integration/node') diff --git a/spec/integration/node/facts_spec.rb b/spec/integration/node/facts_spec.rb index e87a0bdeb..b2c71e42a 100755 --- a/spec/integration/node/facts_spec.rb +++ b/spec/integration/node/facts_spec.rb @@ -1,8 +1,4 @@ #!/usr/bin/env rspec -# -# Created by Luke Kanies on 2008-4-8. -# Copyright (c) 2008. All rights reserved. - require 'spec_helper' describe Puppet::Node::Facts do -- cgit From 49d1e9da1381c77a3873965bad36ba6b33316882 Mon Sep 17 00:00:00 2001 From: Nick Lewis Date: Thu, 21 Jul 2011 11:53:06 -0700 Subject: Rework Puppet::Util::Cacher to only expire using TTLs We have removed every usage of cached_attr in which the attribute needs to be manually expired. Thus, the only meaningful behavior provided by Puppet::Util::Cacher is expiration based on TTLs. This commit reworks the cacher to only support that behavior. Rather than accepting an options hash, of which :ttl is the only available option, cached_attr now requires a second argument, which is the TTL. TTLs are now used to compute expirations, which are stored and used for expiring values. Previously, we stored a timestamp and used it and the TTL to determine whether the attribute was expired. This had the potentially undesirable side effect that the lifetime of a cached attribute could be extended after its insertion by modifying the TTL setting for the cache. Now, the lifetime of an attribute is determined when it is set, and is thereafter immutable, aside from deliberately re-setting the expiration for that particular attribute. Reviewed-By: Jacob Helwig (cherry picked from commit d198fedf65e472b384666fc9ae3bef487852068a) Conflicts: spec/integration/node/facts_spec.rb spec/unit/node_spec.rb --- spec/integration/node/facts_spec.rb | 2 -- 1 file changed, 2 deletions(-) (limited to 'spec/integration/node') diff --git a/spec/integration/node/facts_spec.rb b/spec/integration/node/facts_spec.rb index b2c71e42a..78bdabce1 100755 --- a/spec/integration/node/facts_spec.rb +++ b/spec/integration/node/facts_spec.rb @@ -3,8 +3,6 @@ require 'spec_helper' describe Puppet::Node::Facts do describe "when using the indirector" do - after(:each) { Puppet::Util::Cacher.expire } - it "should expire any cached node instances when it is saved" do Puppet::Node::Facts.indirection.stubs(:terminus_class).returns :yaml -- cgit