diff options
author | Luke Kanies <luke@madstop.com> | 2008-11-14 19:15:37 -0600 |
---|---|---|
committer | Luke Kanies <luke@madstop.com> | 2008-11-15 02:25:47 -0600 |
commit | a8d9976d0a11c4dc50b2ef49c63f3f745cb4eccb (patch) | |
tree | efcbed81569954f135dacc4df11f7988f383e621 /lib | |
parent | 8b0843913c4c4ef063c3f1fb1fec674406bc193d (diff) | |
download | puppet-a8d9976d0a11c4dc50b2ef49c63f3f745cb4eccb.tar.gz puppet-a8d9976d0a11c4dc50b2ef49c63f3f745cb4eccb.tar.xz puppet-a8d9976d0a11c4dc50b2ef49c63f3f745cb4eccb.zip |
Catalogs always consider resource data to be expired if not mid-transaction.
This way we'll cache when in a transaction, but otherwise always
hit the disk so the data is fresh. This works because we
really only use resources mid-transaction, but it behaves correctly
if we happen to use a resource outside of a transaction.
Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/puppet/node/catalog.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/puppet/node/catalog.rb b/lib/puppet/node/catalog.rb index a438a4764..e82e63444 100644 --- a/lib/puppet/node/catalog.rb +++ b/lib/puppet/node/catalog.rb @@ -183,6 +183,14 @@ class Puppet::Node::Catalog < Puppet::SimpleGraph resource end + def expired?(ts) + if applying? + return super + else + return true + end + end + # Make sure we support the requested extraction format. def extraction_format=(value) unless respond_to?("extract_to_%s" % value) |