From 0ecbf79faf8e69efda96f8611837cd1c395f7a7c Mon Sep 17 00:00:00 2001 From: Luke Kanies Date: Tue, 11 Nov 2008 13:12:21 -0800 Subject: Adding cached attribute support to resources. The Catalog is the expirer, which means that a resource with no catalog will not cache data. Also switching files to use a cached attribute for its stat. And modifying catalogs to expire data at the end of every transaction. Signed-off-by: Luke Kanies --- lib/puppet/node/catalog.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/puppet/node') diff --git a/lib/puppet/node/catalog.rb b/lib/puppet/node/catalog.rb index 8862d0cc9..a438a4764 100644 --- a/lib/puppet/node/catalog.rb +++ b/lib/puppet/node/catalog.rb @@ -2,6 +2,8 @@ require 'puppet/indirector' require 'puppet/simple_graph' require 'puppet/transaction' +require 'puppet/util/cacher' + require 'puppet/util/tagging' # This class models a node catalog. It is the thing @@ -15,6 +17,7 @@ class Puppet::Node::Catalog < Puppet::SimpleGraph indirects :catalog, :terminus_class => :compiler include Puppet::Util::Tagging + include Puppet::Util::Cacher::Expirer # The host name this is a catalog for. attr_accessor :name @@ -394,6 +397,9 @@ class Puppet::Node::Catalog < Puppet::SimpleGraph @transient_resources.clear @relationship_graph = nil end + + # Expire any cached data the resources are keeping. + expire() end # Verify that the given resource isn't defined elsewhere. -- cgit