Skip to content

Commit 0d996a9

Browse files
Update README.md
1 parent 42d369d commit 0d996a9

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

README.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,12 @@ Library that helps identifying if the environment can be used for development of
7373
* Module `sysInfo`:
7474
- Usage:
7575
```TypeScript
76-
import { sysInfo } from "nativescript-doctor";
76+
import { sysInfo, setShouldCacheSysInfo } from "nativescript-doctor";
7777

7878
async function main() {
79+
// The default value is true. If set to false the result of each check for each element
80+
// of the sys info will not be cached.
81+
setShouldCacheSysInfo(false);
7982
const javaVersion = await sysInfo.getJavaVersion();
8083
console.log("java: ", javaVersion);
8184

@@ -257,6 +260,13 @@ Library that helps identifying if the environment can be used for development of
257260
* @return {Promise<ISysInfoData>} The system information.
258261
*/
259262
getSysInfo(): Promise<ISysInfoData>;
263+
264+
/**
265+
* If set to true each method will cache it's result. The default value is true.
266+
* @param {boolean} shouldCache The cache switch.
267+
* @return {void}
268+
*/
269+
setShouldCacheSysInfo(shouldCache: boolean): void;
260270
}
261271

262272
interface ISysInfoData {
@@ -393,7 +403,7 @@ Library that helps identifying if the environment can be used for development of
393403
* Information about xcproj.
394404
* @type {string}
395405
*/
396-
xcprojInfo: IXcprojInfo
406+
xcprojInfo: IXcprojInfo;
397407

398408
/**
399409
* true if the system requires xcproj to build projects successfully and the CocoaPods version is not compatible with the Xcode.

0 commit comments

Comments
 (0)