Class ResourceCacheService
java.lang.Object
org.springframework.ai.transformers.ResourceCacheService
Service that helps caching remote 
Resources on the local file system.- Author:
- Christian Tzolov
- 
Constructor SummaryConstructorsConstructorDescriptionResourceCacheService(File rootCacheDirectory) ResourceCacheService(String rootCacheDirectory) 
- 
Method SummaryModifier and TypeMethodDescriptionvoidorg.springframework.core.io.ResourcegetCachedResource(String originalResourceUri) GetResourcerepresenting the cached copy of the original resource.org.springframework.core.io.ResourcegetCachedResource(org.springframework.core.io.Resource originalResource) GetResourcerepresenting the cached copy of the original resource.voidsetExcludedUriSchemas(List<String> excludedUriSchemas) Overrides the excluded URI schemas list.
- 
Constructor Details- 
ResourceCacheServicepublic ResourceCacheService()
- 
ResourceCacheService
- 
ResourceCacheService
 
- 
- 
Method Details- 
setExcludedUriSchemasOverrides the excluded URI schemas list.- Parameters:
- excludedUriSchemas- new list of URI schemas to be excluded from caching.
 
- 
getCachedResourceGetResourcerepresenting the cached copy of the original resource.- Parameters:
- originalResourceUri- Resource to be cached.
- Returns:
- Returns a cached resource. If the original resource's URI schema is within the excluded schema list the original resource is returned.
 
- 
getCachedResourcepublic org.springframework.core.io.Resource getCachedResource(org.springframework.core.io.Resource originalResource) GetResourcerepresenting the cached copy of the original resource.- Parameters:
- originalResource- Resource to be cached.
- Returns:
- Returns a cached resource. If the original resource's URI schema is within the excluded schema list the original resource is returned.
 
- 
deleteCacheFolderpublic void deleteCacheFolder()
 
-