/** * Create a new CachingMetadataReaderFactory for the given {@link ResourceLoader}, * using a shared resource cache if supported or a local resource cache otherwise. * @param resourceLoader the Spring ResourceLoader to use * (also determines the ClassLoader to use) * @see DefaultResourceLoader#getResourceCache */ public CachingMetadataReaderFactory(@Nullable ResourceLoader resourceLoader) { super(resourceLoader); if (resourceLoader instanceof DefaultResourceLoader) { this.metadataReaderCache = ((DefaultResourceLoader) resourceLoader).getResourceCache(MetadataReader.class); } else { setCacheLimit(DEFAULT_CACHE_LIMIT); } }
/** * Create a new CachingMetadataReaderFactory for the given {@link ResourceLoader}, * using a shared resource cache if supported or a local resource cache otherwise. * @param resourceLoader the Spring ResourceLoader to use * (also determines the ClassLoader to use) * @see DefaultResourceLoader#getResourceCache */ public CachingMetadataReaderFactory(@Nullable ResourceLoader resourceLoader) { super(resourceLoader); if (resourceLoader instanceof DefaultResourceLoader) { this.metadataReaderCache = ((DefaultResourceLoader) resourceLoader).getResourceCache(MetadataReader.class); } else { setCacheLimit(DEFAULT_CACHE_LIMIT); } }
/** * Create a new CachingMetadataReaderFactory for the given {@link ResourceLoader}, * using a shared resource cache if supported or a local resource cache otherwise. * @param resourceLoader the Spring ResourceLoader to use * (also determines the ClassLoader to use) * @see DefaultResourceLoader#getResourceCache */ public CachingMetadataReaderFactory(@Nullable ResourceLoader resourceLoader) { super(resourceLoader); if (resourceLoader instanceof DefaultResourceLoader) { this.metadataReaderCache = ((DefaultResourceLoader) resourceLoader).getResourceCache(MetadataReader.class); } else { setCacheLimit(DEFAULT_CACHE_LIMIT); } }