diff options
author | Jeremy J. Miller <jm@chef.io> | 2017-03-10 10:23:10 -0500 |
---|---|---|
committer | Jeremy J. Miller <jm@chef.io> | 2017-03-10 10:23:10 -0500 |
commit | ef833820411baf7e916b4df3c72852b05ea7e9bb (patch) | |
tree | 058f0d661952262434585029c4367cd586f223a3 | |
parent | 1be9d4fa6fe15797daeb880b52a26ec6aed0a624 (diff) | |
download | chef-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.rb | 3 |
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 |