You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+14-4Lines changed: 14 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,20 +20,30 @@ The methods enterCriticalSection and leaveCritialSection are available to suppor
20
20
The library is available in [Maven Central org.spdx:java-spdx-library](https://search.maven.org/artifact/org.spdx/java-spdx-library).
21
21
22
22
If you are using Maven, you can add the following dependency in your POM file:
23
-
```
23
+
```xml
24
24
<dependency>
25
25
<groupId>org.spdx</groupId>
26
26
<artifactId>java-spdx-library</artifactId>
27
27
<version>(,1.0]</version>
28
28
</dependency>
29
29
```
30
30
31
-
[API JavaDocs are available here.](https://spdx.github.io/Spdx-Java-Library/)
31
+
[API JavaDocs are available here](https://spdx.github.io/Spdx-Java-Library/).
32
32
33
33
There are a couple of static classes that help common usage scenarios:
34
34
35
-
- org.spdx.library.SPDXModelFactory supports the creation of specific model objects
36
-
- org.spdx.library.model.license.LicenseInfoFactory supports the parsing of SPDX license expressions, creation, and comparison of SPDX licenses
35
+
-`org.spdx.library.SPDXModelFactory` supports the creation of specific model objects
36
+
-`org.spdx.library.model.license.LicenseInfoFactory` supports the parsing of SPDX license expressions, creation, and comparison of SPDX licenses
37
+
38
+
## Configuration options
39
+
40
+
`Spdx-Java-Library` is configured using Java system properties, as those allow both human operator configuration (via JVM `-D` command line options) as well as programmatic configuration by downstream code that needs automated control.
41
+
42
+
Currently the library offers these configuration options:
43
+
1.`org.spdx.storage.listedlicense.SpdxListedLicenseWebStore.enableCache` - a boolean that enables or disables the WebStore's local cache. Defaults to `false` (the cache is disabled). The cache location is determined as per the [XDG Base Directory Specification](https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html) i.e. `${XDG_CACHE_HOME}/Spdx-Java-Library` or `${HOME}/.cache/Spdx-Java-Library`).
44
+
2.`org.spdx.storage.listedlicense.SpdxListedLicenseWebStore.cacheCheckIntervalSecs` - a long that controls how often each cache entry is rechecked for staleness, in units of seconds. Defaults to 86,400 seconds (24 hours). Set to 0 (zero) to have each cache entry checked every time (note: this will result in a lot more network I/O and negatively impact performance, albeit not as much as not using the cache at all).
45
+
46
+
Note that both of these configuration options can only be modified prior to initialization of Spdx-Java-Library. Once the library is initialized, subsequent changes to either or both of these Java properties will have no effect.
37
47
38
48
## Update for new properties or classes
39
49
To update Spdx-Java-Library, the following is a very brief checklist:
0 commit comments