File

projects/ngforage/src/lib/cache/cached-item.ts

Description

Cached data

Index

Properties

Properties

data
data: T
Type : T

The data

expired
expired: boolean
Type : boolean

Whether the data has expired

expires
expires: Date
Type : Date

When the cached item expired or will expire

expiresIn
expiresIn: number
Type : number

Number of milliseconds until the data expires

hasData
hasData: boolean
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;
}

results matching ""

    No results matching ""