@@ -9,9 +9,10 @@ import { getLogger } from '../logger/logger'
99import { waitUntil } from '../utilities/timeoutUtils'
1010
1111/**
12- * result: the actual resource type callers want to use
13- * locked: readWriteLock, while the lock is acquired by one process, the other can't access to it until it's released by the previous
14- * timestamp: used for determining the resource is stale or not
12+ * args:
13+ * [result]: the actual resource type callers want to use
14+ * [locked]: readWriteLock, while the lock is acquired by one process, the other can't access to it until it's released by the previous
15+ * [timestamp]: used for determining the resource is stale or not
1516 */
1617interface Resource < V > {
1718 result : V | undefined
@@ -35,14 +36,14 @@ function now() {
3536
3637/**
3738 * args:
38- * key: global state key, which is used for globals.globalState#update, #tryGet etc.
39- * expirationInMilli: cache expiration time in milli seconds
40- * defaultValue: default value for the cache if the cache doesn't pre-exist in users' FS
41- * waitUntilOption: waitUntil option for acquire lock
39+ * [ key] : global state key, which is used for globals.globalState#update, #tryGet etc.
40+ * [ expirationInMilli] : cache expiration time in milli seconds
41+ * [ defaultValue] : default value for the cache if the cache doesn't pre-exist in users' FS
42+ * [ waitUntilOption] : waitUntil option for acquire lock
4243 *
4344 * methods:
44- * resourceProvider() : implementation needs to implement this method to obtain the latest resource either via network calls or FS read
45- * getResource() : obtain the resource from cache or pull the latest from the service if the cache either expires or doesn't exist
45+ * # resourceProvider: implementation needs to implement this method to obtain the latest resource either via network calls or FS read
46+ * # getResource: obtain the resource from cache or pull the latest from the service if the cache either expires or doesn't exist
4647 */
4748export abstract class CachedResource < V > {
4849 constructor (
0 commit comments