Constructors
Properties
Accessors
isStale
- get isStale(): boolean
Returns boolean
Methods
destroy
- destroy(): void
Returns void
get
- get(): Promise<null | T>
Returns Promise<null | T>
getCached
- getCached(): null | T
Returns null | T
setData
- setData(data: T, expiresIn: number): void
Returns void
update
- update(force?: boolean): Promise<void>
Returns Promise<void>
get the resource value, refreshing it if needed
note: this method still might return
null
if the resource wasn't ever cached yet, and the underlying call tofetcher
failed