diff options
author | Luke Kanies <luke@madstop.com> | 2009-01-23 15:52:20 -0600 |
---|---|---|
committer | Luke Kanies <luke@madstop.com> | 2009-02-06 18:08:41 -0600 |
commit | f78a5653ae1c0fe3931c4102ce32f640c80db158 (patch) | |
tree | 4537c1e326d6a2141b245477bdd8c4a0ce7fa007 /lib | |
parent | 54344591fde1a280f38032731e0ccb19521f6611 (diff) | |
download | puppet-f78a5653ae1c0fe3931c4102ce32f640c80db158.tar.gz puppet-f78a5653ae1c0fe3931c4102ce32f640c80db158.tar.xz puppet-f78a5653ae1c0fe3931c4102ce32f640c80db158.zip |
Only caching saved resources when the main save works
This way you don't have data cached that couldn't be
saved to the main repository.
Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/puppet/indirector/indirection.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/puppet/indirector/indirection.rb b/lib/puppet/indirector/indirection.rb index 4ca19cb27..c560bb5b7 100644 --- a/lib/puppet/indirector/indirection.rb +++ b/lib/puppet/indirector/indirection.rb @@ -244,9 +244,10 @@ class Puppet::Indirector::Indirection request = request(:save, instance, *args) terminus = prepare(request) + terminus.save(request) + # If caching is enabled, save our document there cache.save(request) if cache? - terminus.save(request) end private |