Skip to content

Commit 77007e9

Browse files
committed
📚 Improve JavaDocs
1 parent ee1f1a9 commit 77007e9

1 file changed

Lines changed: 13 additions & 8 deletions

File tree

src/main/java/org/spdx/utility/DownloadCache.java

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,20 @@
5555
import org.spdx.Configuration;
5656

5757
/**
58-
* This singleton class provides a configurable download cache for the rest of the library. If enabled, URLs that are
59-
* downloaded using this class will be automatically cached locally on disk (in a directory that adheres to the XDG Base
60-
* Directory Specification - https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html), and any
61-
* subsequent requests will be served out of that cache. Cache entries will be automatically checked for staleness
62-
* (via HTTP ETag requests) on subsequent runs
58+
* This singleton class provides a flexible download cache for the rest of the library. If enabled, URLs that are
59+
* requested using this class will have their content automatically cached locally on disk (in a directory that adheres
60+
* to the XDG Base Directory Specification - https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html),
61+
* and any subsequent requests will be served out of that cache. Cache entries will also be automatically checked every
62+
* so often for staleness using HTTP ETag requests (which are more efficient than full HTTP requests). The interval
63+
* between such checks is configurable (and can even be turned off, which makes every download request re-check the URL
64+
* for staleness).
6365
*
64-
* The class supports these Configuration options:
65-
* org.spdx.storage.listedlicense.enableCache -
66-
* org.spdx.storage.listedlicense.cacheCheckIntervalSecs
66+
* The cache is configured via these Configuration options:
67+
* * org.spdx.storage.listedlicense.enableCache:
68+
* Controls whether the cache is enabled or not. Defaults to false i.e. the cache is disabled.
69+
* * org.spdx.storage.listedlicense.cacheCheckIntervalSecs:
70+
* How many seconds should the cache wait between issuing ETag requests to determine whether cached content is
71+
* stale? Defaults to 86,400 seconds (24 hours).
6772
*/
6873
public final class DownloadCache {
6974
private static final Logger logger = LoggerFactory.getLogger(DownloadCache.class);

0 commit comments

Comments
 (0)