private <T, Y> void cacheModelLoader(Class<T> modelClass, Class<Y> resourceClass, ModelLoader<T, Y> modelLoader) {
        Map<Class/*Y*/, ModelLoader/*T, Y*/> resourceToLoaders = cachedModelLoaders.get(modelClass);
        if (resourceToLoaders == null) {
            resourceToLoaders = new HashMap<Class/*Y*/, ModelLoader/*T, Y*/>();
            cachedModelLoaders.put(modelClass, resourceToLoaders);
        }
        resourceToLoaders.put(resourceClass, modelLoader);
    }
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