summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy J. Miller <jm@chef.io>2017-03-09 11:25:12 -0500
committerJeremy J. Miller <jm@chef.io>2017-03-09 11:25:12 -0500
commitf83d4e89405c0daa8bbaf1e381788bfc6f86385f (patch)
tree72b71be1f8e4f497a64e65bf6c4232806ac2a833
parent40ee87c8cd703ff174904945a95367e3f3efd7be (diff)
downloadchef-f83d4e89405c0daa8bbaf1e381788bfc6f86385f.tar.gz
free up target_object on delete
Signed-off-by: Jeremy J. Miller <jm@chef.io>
-rw-r--r--lib/chef/chef_fs/file_system/chef_server/rest_list_entry.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/chef/chef_fs/file_system/chef_server/rest_list_entry.rb b/lib/chef/chef_fs/file_system/chef_server/rest_list_entry.rb
index 2d754ed668..63a1eeccff 100644
--- a/lib/chef/chef_fs/file_system/chef_server/rest_list_entry.rb
+++ b/lib/chef/chef_fs/file_system/chef_server/rest_list_entry.rb
@@ -86,6 +86,8 @@ class Chef
end
def delete(recurse)
+ # free up cache - it will be hydrated on next check for exists?
+ @target_object = nil
rest.delete(api_path)
rescue Timeout::Error => e
raise Chef::ChefFS::FileSystem::OperationFailedError.new(:delete, self, e, "Timeout deleting: #{e}")