summaryrefslogtreecommitdiff
path: root/lib/chef/chef_fs/chef_fs_data_store.rb
diff options
context:
space:
mode:
authorThom May <thom@may.lt>2016-08-02 09:07:57 +0100
committerGitHub <noreply@github.com>2016-08-02 09:07:57 +0100
commite5fa9785cebfdbe233e8e465c67f07d63e4c8b55 (patch)
treede18f9ef4753b66d4272febf9f82ba62e25c714c /lib/chef/chef_fs/chef_fs_data_store.rb
parent3c658aefc5f683969b91a369a04d5095d64b768d (diff)
parent9e12616c410175a425552240d37a35d3b2498c24 (diff)
downloadchef-e5fa9785cebfdbe233e8e465c67f07d63e4c8b55.tar.gz
Merge pull request #5154 from chef/tm/cache_invalidate
Invalidate the file system cache on deletion
Diffstat (limited to 'lib/chef/chef_fs/chef_fs_data_store.rb')
-rw-r--r--lib/chef/chef_fs/chef_fs_data_store.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/chef/chef_fs/chef_fs_data_store.rb b/lib/chef/chef_fs/chef_fs_data_store.rb
index aa5a6d5a69..6b3e830f8d 100644
--- a/lib/chef/chef_fs/chef_fs_data_store.rb
+++ b/lib/chef/chef_fs/chef_fs_data_store.rb
@@ -458,6 +458,7 @@ class Chef
# We want to delete just the ones that == POLICY
next unless policy.name.rpartition("-")[0] == path[1]
policy.delete(false)
+ FileSystemCache.instance.delete!(policy.file_path)
found_policy = true
end
raise ChefZero::DataStore::DataNotFoundError.new(path) if !found_policy