private <T, Y> ModelLoader<T, Y> getCachedLoader(Class<T> modelClass, Class<Y> resourceClass) {
        Map<Class/*Y*/, ModelLoader/*T, Y*/> resourceToLoaders = cachedModelLoaders.get(modelClass);
        ModelLoader/*T, Y*/ result = null;
        if (resourceToLoaders != null) {
            result = resourceToLoaders.get(resourceClass);
        }

        return result;
    }
Returns a {@link ModelLoader} for the given model and resource classes by either returning a cached
{@link ModelLoader} or building a new a new {@link ModelLoader} using registered {@link ModelLoaderFactory}s.
Returns null if no {@link ModelLoaderFactory} is registered for the given classes.

@param modelClass The model class.
@param resourceClass The resource class.
@param <T> The type of the model.
@param <Y> The type of the resource.
core/src/main/java/com/bumptech/glide/load/model/GenericLoaderFactory.java