Class ContentFileCache
java.lang.Object
org.apache.sling.fsprovider.internal.parser.ContentFileCache
Cache for parsed content from content files (e.g. JSON, JCR XML).
-
Constructor Details
-
ContentFileCache
public ContentFileCache(int maxSize) - Parameters:
maxSize
- Cache size. 0 = caching disabled.
-
-
Method Details
-
get
Get content.- Parameters:
path
- Path (used as cache key).file
- File- Returns:
- Content or null
-
get
Get content.- Parameters:
path
- Path (used as cache key).file
- FilecontentType
- Content type - if null type is auto-detected- Returns:
- Content or null
-
remove
Remove content from cache.- Parameters:
path
- Path (used as cache key)
-
clear
public void clear()Clear whole cache -
size
public int size()- Returns:
- Current cache size
-