summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy J. Miller <jm@chef.io>2017-03-10 10:23:10 -0500
committerJeremy J. Miller <jm@chef.io>2017-03-10 10:23:10 -0500
commitef833820411baf7e916b4df3c72852b05ea7e9bb (patch)
tree058f0d661952262434585029c4367cd586f223a3
parent1be9d4fa6fe15797daeb880b52a26ec6aed0a624 (diff)
downloadchef-ef833820411baf7e916b4df3c72852b05ea7e9bb.tar.gz
invalidate @this_object_cache also in write
Signed-off-by: Jeremy J. Miller <jm@chef.io>
-rw-r--r--lib/chef/chef_fs/file_system/chef_server/rest_list_entry.rb3
1 files changed, 3 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 22a8c54511..c16c5ad4d7 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
@@ -165,6 +165,9 @@ class Chef
end
def write(file_contents)
+ # free up cache - it will be hydrated on next check for exists?
+ @this_object_cache = nil
+
begin
object = Chef::JSONCompat.parse(file_contents)
rescue Chef::Exceptions::JSON::ParseError => e