From 4a45a1da0653f18df6bd41b009a30387df697909 Mon Sep 17 00:00:00 2001 From: Luke Kanies Date: Sun, 16 Mar 2008 17:52:46 -0500 Subject: Caching node information in yaml (I figured caching in memory will cause ever-larger memory growth), and changing the external node terminus to use the version of the facts as their version. This will usually result in the cached node information being used, instead of always hitting the external node app during file serving. Note that if the facts aren't changed by the client, then this will result in the cached node being used, but at this point, the client always updates its facts. (#1130) --- lib/puppet/indirector/node/exec.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lib/puppet/indirector/node/exec.rb') diff --git a/lib/puppet/indirector/node/exec.rb b/lib/puppet/indirector/node/exec.rb index 71f4fa8e1..dcfc625b2 100644 --- a/lib/puppet/indirector/node/exec.rb +++ b/lib/puppet/indirector/node/exec.rb @@ -24,6 +24,13 @@ class Puppet::Node::Exec < Puppet::Indirector::Exec return create_node(name, result) end + # Use the version of the facts, since we assume that's the main thing + # that changes. If someone wants their own way of defining version, + # they can easily provide their own, um, version of this class. + def version(name) + Puppet::Node::Facts.version(name) + end + private # Turn our outputted objects into a Puppet::Node instance. -- cgit