Constructor and Description |
---|
FileSystemCache(File directory)
Creates a new FileSystemCache using the specified directory as the location for cache files and creates the specified directory (including any necessary parent directories) if it does not already exist
|
Modifier and Type | Method and Description |
---|---|
String |
get(String url)
Retrieves and returns the HTML/XML content for the specified url from the cache or returns null if the cache has no content for the specified url.
|
File |
getDirectory() |
void |
put(String url,
String content)
Stores the specified HTML/XML content retrieved from the specified url into the cache, or does nothing if the specified content is null.
|
public FileSystemCache(File directory) throws CacheException
directory
- the directory in which to perform caching.CacheException
public File getDirectory()
public void put(String url, String content) throws CacheException
put
in interface Cache
CacheException
public String get(String url) throws CacheException
get
in interface Cache
CacheException