Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/puppet/resource_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ def to_resource_shim(resource)
def self.rsapi_provider_get(names = nil)
# If the cache has been marked as having all instances, then just return the
# full contents:
return rsapi_provider_get_cache.all if rsapi_provider_get_cache.cached_all? && names.nil?
return rsapi_provider_get_cache.all if rsapi_provider_get_cache.cached_all?

fetched = if type_definition.feature?('simple_get_filter')
my_provider.get(context, names)
Expand All @@ -265,7 +265,7 @@ def self.rsapi_provider_get(names = nil)
rsapi_provider_get_cache.add(build_title(type_definition, resource_hash), resource_hash)
end

if names.nil? && !type_definition.feature?('simple_get_filter')
unless type_definition.feature?('simple_get_filter')
# Mark the cache as having all possible instances:
rsapi_provider_get_cache.cached_all
end
Expand Down