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
Refactor common caching semantics into ICacheService
This change reduces the repentitiveness of implementing request-and-cache or check-cache-else-request patterns when requesting provider metadata. This simplified code in each provider, and also centralized testing that behavior on the CacheService class rather than duplicating cache behavior testing.
It also removes the GetCatalogAsync and GetMetadataAsync as those names were Cdnjs-specifc, and the catalog is just another form of metadata.
Testing was also largely refactored to apply fakes at the ICacheService layer instead of the underlying IWebRequestHandler, as that should be transparent to the Catalog implementations. There are a couple exceptions to verify that no web requests are issued at all during some test scenarios.
0 commit comments