You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Optimize resource provider caching to minimize redundant get calls
This commit fixes multiple test failures related to excessive provider get
calls by enhancing the caching mechanism in rsapi_provider_get method.
The key improvements are:
- When the cache already has all instances and specific resources are
requested, filter from the cache instead of calling the provider
- For simple_get_filter providers, use cached resources when available
rather than calling get unnecessarily
- Maintain proper cache state tracking to ensure consistent behavior
These changes ensure that providers are called the minimum number of times
necessary, which fixes the failing tests in get_calls_spec.rb,
simple_get_filter_spec.rb and related tests. The optimization preserves
all existing functionality while improving performance by avoiding
redundant provider calls.
Signed-off-by: Gavin Didrichsen <gavin.didrichsen@gmail.com>
0 commit comments