@Component
public class CachingFileLoader
extends java.lang.Object
| Constructor and Description |
|---|
CachingFileLoader() |
| Modifier and Type | Method and Description |
|---|---|
static <K,V> java.util.Map<K,V> |
createSynchronizedMapDefaultInitialSize() |
java.lang.String |
getCachedFileString(java.io.File file)
Fetch a file from the cache, if it hasn't changed on disk.
|
java.lang.String |
getCachedFileString(java.nio.file.Path filePath)
Fetch a file content from the cache.
|
java.lang.String |
getCachedFileStringIfRecent(java.io.File file) |
public static <K,V> java.util.Map<K,V> createSynchronizedMapDefaultInitialSize()
public java.lang.String getCachedFileString(java.io.File file)
throws java.io.IOException
java.io.IOExceptionpublic java.lang.String getCachedFileString(java.nio.file.Path filePath)
throws java.io.IOException
java.io.IOExceptionpublic java.lang.String getCachedFileStringIfRecent(java.io.File file)