projects/ngforage/src/lib/cache/cached-item.ts
Cached data
Properties |
data |
data:
|
Type : T
|
The data |
expired |
expired:
|
Type : boolean
|
Whether the data has expired |
expires |
expires:
|
Type : Date
|
When the cached item expired or will expire |
expiresIn |
expiresIn:
|
Type : number
|
Number of milliseconds until the data expires |
hasData |
hasData:
|
Type : boolean
|
Whether data was found |
export interface CachedItem<T> {
/** The data */
readonly data: T;
/** Whether the data has expired */
readonly expired: boolean;
/** When the cached item expired or will expire */
readonly expires: Date;
/** Number of milliseconds until the data expires */
readonly expiresIn: number;
/** Whether data was found */
readonly hasData: boolean;
}