private RoutableFactory getFactory(Version version, int type) {
        CacheKey cacheKey = new CacheKey(version, type);
        RoutableFactory factory = cache.get(cacheKey);
        if (factory != null) {
            return factory;
        }
        VersionMap versionMap = factoryTypes.get(type);
        if (versionMap == null) {
            return null;
        }
        factory = versionMap.getFactory(version);
        if (factory == null) {
            return null;
        }
        cache.put(cacheKey, factory);
        return factory;
    }
Returns the routable factory for a given version and routable type.

@param version The version that the factory must support.
@param type    The routable type that the factory must support.
@return The routable factory matching the criteria, or null.
documentapi/src/main/java/com/yahoo/documentapi/messagebus/protocol/RoutableRepository.java