Store ::nil markers in CachedMetadataProvider for failed lookups (#47589)
* Fix typo in MetadataProvider docstring * Fix typo in caching-test: s/Second/Third/ * Store ::nil markers in CachedMetadataProvider for failed lookups Store ::nil markers in CachedMetadataProvider for any ids for which the wrapped/uncached upstream provider fails to return metadatas. This prevents repeatedly querying the uncached-provider for ids that don't exist. The downside is that if the uncached-provider suddenly starts returning metadata for an id that previously did not exist, we won't pick up on it, but the assumption here is that this is no different / worse than cache invalidation for existing ids that happen to change after we cache them. * PR suggestion: remove unnecessary test assertion
Showing
- src/metabase/lib/metadata/cached_provider.cljc 11 additions, 3 deletionssrc/metabase/lib/metadata/cached_provider.cljc
- src/metabase/lib/metadata/protocols.cljc 1 addition, 1 deletionsrc/metabase/lib/metadata/protocols.cljc
- test/metabase/lib/metadata/cached_provider_test.cljc 21 additions, 5 deletionstest/metabase/lib/metadata/cached_provider_test.cljc
Loading