enableCaching
void log.enableCaching ( String description, boolean saveLogs, boolean zipCachedFiles ) (professional and enterprise editions only)
Description
Enables caching for this scrape. When caching is enabled, each time a scrapeable file is downloaded it will be saved to the file system. Once the session is completed the cache will be either zipped or the directory renamed, depending on the conditions that were specified when the cache was enabled. Optionally this will save the log files to the cached location, and will save everything from the error.log file that was added while the cache was enabled.
Parameters
- description A description to use in the cached file name
- saveLogs True if logs should be included in the cache
- zipCachedFiles True if the cached files should be zipped once the scrape ends.
Return Value
This method returns void.
Change Log
Version | Description |
---|---|
5.5.29a | Available in professional and enterprise editions. |
5.5.32a | Renamed from enableCache to enableCaching |
5.5.43a | Moved from session to log class. |
Examples
Cache the pages requested by the scrape
// No special description is needed, but we want logs to be saved, and the output to be a zipped file
log.enableCaching("", true, true);
log.enableCaching("", true, true);
mikes on 11/21/2011 at 2:17 pm
- Printer-friendly version
- Login or register to post comments